Hi,
here is my code $("div:visible:not(#div1)").hide();
The Problem: the DIV-Childs from #div1 are hided too :(
kind reagards Peter
Hi,
here is my code $("div:visible:not(#div1)").hide();
The Problem: the DIV-Childs from #div1 are hided too :(
kind reagards Peter
Try this:
$("div:visible").not('#div1, #div1 *').hide();
or if you only want to exclude children elements of type div
:
$("div:visible").not('#div1, #div1 div').hide();
Actually, a child selector uses the "greater than" character:
#div1 > div (all div children of div id "div1")
The space between two selectors targets all descendants:
#div1 div (all div descendants of div id "div1")