PDA

View Full Version : How To Make The Menu Bar Stay



satia
13 Jan 2013, 09:20 PM
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

khayhurst
29 Jan 2013, 03:27 AM
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?

aman1
29 Jan 2013, 04:12 AM
It is very interesting and useful post.