I want to hide all child elements in a div. And then show a specific one passed on to the function.
function subDisplay(name) { $(\"#navSub\").each(functi
You need to hide the children and not the containing div.
$("#navSub").children().hide();
So now if the div you are trying to show is an element in the parent div it will still show while the others stay hidden.