Results 1 to 3 of 3

Thread: How To Make The Menu Bar Stay

  1. #1
    Join Date
    Feb 2012
    Posts
    4

    How To Make The Menu Bar Stay

    HI,

    I need some help on my jquery. I need to make the menu bar stay put. This is my coding below:
    Can anyone help pls.

    $(document).ready(function(){

    $('li.button a').click(function(e){

    /* Finding the drop down list that corresponds to the current section: */
    var dropDown = $(this).parent().next();

    /* Closing all other drop down sections, except the current one */
    $('.dropdown').not(dropDown).slideUp('slow');
    dropDown.slideToggle('slow');

    /* Preventing the default event (which would be to navigate the browser to the link's address) */
    e.preventDefault();
    })

    });

    Regards
    Satia

  2. #2
    Join Date
    Jan 2013
    Posts
    6
    Is there any way you can give us more code? It's a little hard to tell but it almost looks as if you're closing all but the selected item:
    $('.dropdown').not(dropDown).slideUp('slow');

    And then slowly closing the selected one?
    dropDown.slideToggle('slow');

    Another click would slowly open it correct?

  3. #3
    Join Date
    Oct 2011
    Posts
    116
    It is very interesting and useful post.

Similar Threads

  1. Menu bar over slideshow
    By zignar in forum Web Design, HTML Reference and CSS
    Replies: 1
    Last Post: 21 Apr 2011, 01:27 PM
  2. Make a dark styled navigation bar
    By Jyep in forum Tutorials
    Replies: 1
    Last Post: 29 May 2009, 09:35 PM
  3. How to make Dynamic Bar chart on the server
    By kevinsmith in forum Web Design, HTML Reference and CSS
    Replies: 0
    Last Post: 09 Feb 2008, 08:57 AM
  4. How to make top bar not reload again
    By chato in forum General Questions
    Replies: 1
    Last Post: 08 Jan 2007, 02:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •