Forums

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

Home Forums Other jQuery DropDown Sidebar Navigation Help

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

    Hello everyone

    This is my first post, so far I’ve manage to get by through just reading what everyone else has to say but I’m afraid I need some specific help and hopefully I’ll understand a little bit better.

    I am creating a sidebar jQuery drop down navigation for a site. It’s a simple drop down I’m after that when the user mouses over they will see more sub-links should there be any. Here’s the XHTML I’ve written for it.

    I need the list items underneath "Our Projects" to drop down when hovered over and disappear when the mouse moves away. The jQuery code I’ve come up with either hides everything or hides nothing when I mouse over.

    All help will be gratefully received.

    Regards

    Adam

    #49120
    magichew
    Member

    I was hoping I wouldn’t have to embarrass myself by doing that. I was hoping someone would just be able to look at the XHTML and give me the jQuery code. Better yet would be someone who could talk me through what each bit of the code was doing.

    #49121

    a quick google brings up http://ayozone.org/2008/02/06/drop-down-menu-with-jquery/.

    Have a look what the code is doing and go from there –

    Code:


    Roll over this text to show the menu

    #49203
    magichew
    Member

    Thanks for your reply, I have Googled it already and looked at a similar effect to the one Jeffrey @ detatcheddesigns.com demonstrated in a jQuery tutorial on there but I couldn’t get it to work.
    I suppose I’ll keep trying.

    #49235
    magichew
    Member

    Alright, I’ve got it doing what I want it to do and it’s okay for now.

    XHTML

    jQuery

    Code:
    $(document).ready(function()

    {
    $(“li.subnav”).hide();
    $(“li.topnav”).hover(
    function()
    {
    $(“li.subnav”).slideDown();
    },
    function()
    {
    $(“li.subnav”).slideUp();
    });
    });

    But I’ve tested this with more than one subnav and of course, when you mouse over one topnav list item it slides down all subnav list items, not just set you want when you hover over the topnav one that you want.

    Any help will be gratefully received.

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