selective stoppropagation jquery
问题 Javascript code: $(".div1").click(function(event){ event.stopPropagation(); $(".div1 div").slideToggle(); }); $(".div2").click(function(event){ event.stopPropagation (); $(".div2 div").slideToggle(); }); $(document).click(function(event){ $(".div1 div,.div2 div").slideUp(); }); Suppose I click .div1 & .div1 div slides down. Then i click .div2 But as event.stopPropagation is executed, .div1 div doesnot slide up. So what should i do? I dont want to put this code $(".div1 div").slideUp(); as it