Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery click on parent but not child

$(document).ready(function(){
    $(".header").click(function(){
        $(this).children(".children").toggle();
    });
   $(".header a").click(function(e) {
        e.stopPropagation();
   });
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #jquery #click #parent #child
ADD COMMENT
Topic
Name
4+1 =