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

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -