When i added one select into label and binding for click event, jquery fires twice.
html:
<label class="lol">
<div>
bla
</div>
<div style="display:none;">
<select></select>
</div>
</label>
javascript:
$("label.lol").on({
click : function ()
{
alert(1);
}
})
How can i fix this bug without adding “for” attribute to labels?
I know there are already many answers to this question but are vague.
Ok, Everyone appreciated. Problem Solved. But Question arises Why
return false;.Answer In Simple Words: It is a way of telling computer that return from the function, the task i gave to you is completed. No more Mess now.