i have a list that's dynamically generated. What i'm trying to do is show only the nested list of the page the person is on. How i think i can do that is by default i will hide all the nested items of this list, giving me only the first level of the (ul). What I want to do next is find in the nested list the name of the page (the name of the page will always be in the navigation) and when i find it, i want to show all of the found (li) neseted (ul)'s and parent (ul). Currently i got it so it only shows me the first level so my lists looks like this
Stone Mosaics
Glass Mosaics
Medallions & Murals
Etched Stone
If i'm on the basket weave page, i need it to look like this:
Stone Mosaics
Basketweave
one
two
three
Blanch
Chex
Glass Mosaics
Medallions & Murals
Etched Stone
So again, "find" Basketweave and show it and it's parent and it's children (1 level down). I hope this makes sense. Here's the code of the list:
<div id="subNav">
<ul>
<li> <a href="/stone-mosaics?nav=collections">Stone Mosaics</a>
<ul>
<li> <a href="/basketweave?nav=collections">Basketweave</a> </li>
<ul>
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
<li> <a href="/blanch?nav=collections">Blanch</a> </li>
<li> <a href="/chex?nav=collections">Chex</a></li>
</ul>
</li>
<li> <a href="/glass_mosaics?nav=collections">Glass Mosaics</a> </li>
<li> <a href="/medallions_and_murals?nav=collections">Medallions & Murals</a>
<ul>
<li> <a href="/cucina?nav=collections">Cucina</a> </li>
<li> <a href="/glow?nav=collections">Glow</a> </li>
<li> <a href="/Louvre?nav=collections">Louvre</a> </li>
<li> <a href="/pools?nav=collections">Pools</a> </li>
<li> <a href="/Tapeti?nav=collections">Tapeti</a> </li>
</ul>
</li>
<li> <a href="/etched_stone?nav=collections">Etched Stone</a>
<ul>
<li> <a href="/Barroque?nav=collections">Barroque</a> </li>
<li> <a href="/Bordo-Antico?nav=collections">Bordo Antico</a></li>
</ul>
</li>
</ul>
</div>
Thanks for all of your help!