Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Show a div if nav item is selected

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #36985

    Hello,
    I want to show a little message underneath a nav item if its currently selected. I have been doing some research on how to do this and haven’t gotten very far. I know I have seen this done in css3 and in jquery. i know I posted this in the javascript forum but I would like to know how to do it both ways. Here is a screen shot of what i want to accomplish http://cl.ly/3f3W04401f1w1L2K212F I already have a ul for the nav, with a class of .current for the selected nav item. Now i just need to know what the best way to hide the information for the unselected nav item. I played around with some jquery, using a if statement .hasClass and .removeClass functions with no luck. I just need to be pointed in the right direction. Thanks for any help.

    #98222

    Here is a pure CSS version for you: http://jsfiddle.net/joshnh/a2HGf/

    If you have any questions feel free to ask!

    #98228

    Thanks guys for the information. Joshuan thats exactly what I needed. Much appreciated

    #98229

    No worries at all! Feel free to use/abuse that code too.

    #134860
    Jumpmanj6
    Member

    How do you make this a vertical menu?

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.