i am having a problem when i click on an input(button) (click event captured using jquery) it is executed two times but the click event is single... i used "e.stopPropagation();" - but it didn't work...
jQuery("#ok").click(function(e){
alert("Alert");
e.stopPropagation();
});
i need the reason and the solution...
take care..
problem is solved...
i just added e.stopImmediatePropagation();
to the click function... and it worked... None of the following functions worked...
e.preventDefault();
e.stopPropagation();
return false
---------------------CODE---------------------
jQuery("#ok").click(function(e){
alert("Alert");
e.stopImmediatePropagation();
});
Click here for more information on jQuery Events..
Please use e.stop(true,true)
and function which you are using. like
e.stop(true,true).show();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With