I have a div with a click event bound to it. I want to add an anchor tag inside this div that will not trigger the action of the div click. I have tried putting 'onclick="return false;"' on the anchor but it still triggers the click on the div. Is there a trick to this?
I have a div with a click event bound to it. I want to
Share
Given that you’re using jQuery’s
click(), you can do:Or: