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
Try having it outside of the loop, like so:
function subDisplay(name) { $("#navSub").hide(); $(name).show(); }
http://jsfiddle.net/peduarte/m2pj8/