I have couple <a>
within a parent div which will perform a specific action when clicked. How can I make it so that when user clicks each <a href="xxxx">
, user will only get linked to other pages and the parent function will not be triggered?
Stop the click
event from bubbling up to the parent, like so:
$("a").click(function(e) {
e.stopPropagation();
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.