Bind an event to some element without binding to it's child - JQuery -
i have div called mydiv. have click event attached it. inside of div have link. want event not triggered after clicking on link. smth like
$(document).on('click', '#mydiv a', function(){ // how disable parent's event here? }); thank you!
this should you're looking for:
$(document).on('click', '#mydiv a', function(e){ // how disable parent's event here? e.stoppropagation(); });
Comments
Post a Comment