Thiago
Thiago

Reputation: 75

jQuery Close dropdown menu open when another menu is clicked

I have this code: http://jsfiddle.net/a9GUX/

Example, when the menu "one" is open, and the person clicks on the menu "four", the menu one closes automatically. I've done some tests but some do nothing and others open all / close all.

Thanks in advance.

Upvotes: 0

Views: 2344

Answers (1)

Zoltan Toth
Zoltan Toth

Reputation: 47667

Add this line

$(this).siblings('li').children('ul,p').slideUp('slow');

DEMO

Upvotes: 1

Related Questions