I have the following html:
<ul id="all-terminals">
<li data-terminal-id="101" class="">
<label>
<input type="radio" name="terminal" class="all" data-terminal-id="101">
<a ...></a>
...
</label>
</li>
<li data-terminal-id="100" class="active">
<label>
<input type="radio" name="terminal" class="all" data-terminal-id="100">
<a ..></a>
...
</label>
</li>
<li data-terminal-id="102" class="">
<label>
<input type="radio" name="terminal" class="all" data-terminal-id="102">
<a...></a>
...
</label>
</li>
</ul>
I wrote the following listener:
$(document).on('click', '#all-terminals li label', function(){alert(123)});
when I click on label, I see that alert executes twise.
Why?
Not exactly sure why, but
mouseup
works.