Not an solution, but a possibly suggestions would be:

If at all possible, modify the existing html.

If you absolutely cannot do that, at least you have structured content.
You could always iterate over the content and build a new structure,
taking out the parts you don't need or want.

-----Original Message-----
From: hroyale [mailto:hroy...@gmail.com] 
Sent: Friday, October 30, 2009 9:24 AM
To: jQuery (English)
Subject: [jQuery] Hide a nested UL, but show children

Hi,
I have a set of nested ULs that is generated for me. I want to use it
to create a drop-down navigation menu, however I don't want to use the
values in the second level of ULs in the navigation.

It looks something like this:

<ul class="topMenu">
    <li>home</li>
    <li>community
        <ul>
            <li>awards (not a link)
                    <ul>
                        <li>award type 1</li>
                        <li>award type 2</li>
                    </ul>
            <li>discussions (not a link)
                    <ul>
                        <li>discussion 1
                           <ul>
                                <li>more info</li>
                            </ul>
                        </li>
                    </ul>
            </li>
        </ul>
     </li>
    <li>news and events
        <ul>
            <li>news (not a link)
                <ul>
                    <li>press coverage</li>
                    <li>press releases</li>
                    <li>announcements</li>
                </ul>
            </li>
            <li>events (not a link)
                <ul>
                    <li>conferences</li>
                </ul>
            </li>
        </ul>
  </li>
</ul>

Level one is visible as sort of tabs, and then mousing over should
reveal a list of the next level of links. However, I would like to use
the above list and mouse over  "community" and see a list of links
award type 1
award type 2
discussion 1

rather than

awards
discussions

Or another option would be to combine levels 2 and 3 so I would see

awards
award type 1
award type 2
discussions
discussion1

and then mousing over discussion 1 would reveal the more info link.

Please don't send me code to do the drop-down menus. I have a ton of
those. I'm only looking for help dealing with the nested UL that I
want to skip over.

Thanks,
Heather

Reply via email to