Error In Javascript Or Jquery Select Element
Jquery: $('#div td').live('click', function(){ alert('Hellow'); }); Javascript: function alertH(){ alert('Hellow'); } HTML Jquery: X
Solution 1:
One way to do it is by adding the code on each element you dont want to call a function
onClick="event.cancelBubble = true;"
Another way is to check in the callback called to see the Target there.
<div onClick="test()"id="run">
Click Works<br>
<label>Not Work</label>
</div>
functiontest(){
if (event.target.id !== "run") returnfalse;
alert(event.target);
}
Post a Comment for "Error In Javascript Or Jquery Select Element"