jquery - If there is a button in a link, when I click this button, how to avoid the link? -


if there button in link, when click button, how avoid link?

you can stop propagation (event bubbling) .stoppropagation(), this:

$("a :button").click(function(e) {   e.stoppropagation(); }); 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -