Denise
Denise

Reputation: 1469

Pull Down Menu and Buttons in jQuery

I have the following example of a pull down menu.

http://jsfiddle.net/hashie5/6qzu8/23/

How can I make those menus stay when I want to click on it? At the moment it will disappear as soon as I don't hover the buttons anymore.

Thanks!

Upvotes: 0

Views: 153

Answers (2)

Eirinn
Eirinn

Reputation: 836

Once your mouse stops hovering over the button the toggle draws the menu back up.

I'm not sure if this is the effect you're looking for, but you could make it so when someone hovers over the button athe menu is pulled down. If the user hovers over another menu it is pulled up again. You're probably looking at a mouseover effect instead.

There's a short hand for the click/hover mouseover and so on function in jquery if you don't need delegate specifically.

http://jsfiddle.net/6qzu8/30/

PS: i think i may have unintentionally updated your fiddle :S I hope this at least helps.

Upvotes: 1

giker
giker

Reputation: 4245

Just place your submenu inside main item.

http://jsfiddle.net/6qzu8/29/

Upvotes: 4

Related Questions