How come ..
$("div.toggle1").hide(); $("div.toggle3").hide(); $("div.toggle4").hide(); $("div.toggle5").hide();
not tantamount to this ...
$('#container div').not('.toggle2').hide();
which occurs in the click event, but it doesnβt work the same way as it manually prints a few hide () tags. I'm just trying to reduce the use of hide () tags for each div, which I continue to add to my parent div #container.
source share