SyntaxFix
Write A Post
Hire A Developer
Questions
Better way by using on() with chaining like,
$(document).ready(function(){ $(".header").on('click',function(){ $(this).children(".children").toggle(); }).on('click','a',function(e) { e.stopPropagation(); }); });