jquery - Prevent javascript execution -
<div onclick="autogeneratedmethod()"> <span>span 1 : require auto method </span> <span onclick="desiredmethod()">span 2 : not require auto method</span> </div> in above code sample, how prevent calling autogeneratedmethod() when user clicks on span 2? not have control on declaration of div , respective onclick behavior. line auto-generated framework using.
i'm looking kill javascript execution @ end of desiredmethod(). this:
function desiredmethod() { //do necessary stuff exit; //abort further javascript }
you want stop event propagation. ie has cancelbubble.
Comments
Post a Comment