Answers for "jquery ignore parent click if child was clicked"

2

jquery delete grand parent of clicked element

$(this).closest('.grand-parent-class-name').remove();
Posted by: Guest on November-24-2020
2

jquery click on parent but not child

$(document).ready(function(){
    $(".header").click(function(){
        $(this).children(".children").toggle();
    });
   $(".header a").click(function(e) {
        e.stopPropagation();
   });
});
Posted by: Guest on April-28-2020

Code answers related to "jquery ignore parent click if child was clicked"

Code answers related to "Javascript"

Browse Popular Code Answers by Language