jquery - Sub menu slides up then back down if it is already down selected (bug) -


hello having problem jquery vertical accordion style menu.

if click sub menu, drops down. if click on different sub menu, current 1 slides , 1 clicked slides down.

i using .slideup() jquery function default sub menus position before sliding next 1 down.

the problem when click on sub menu, drops down, click on same sub menu, slides , slides down again.

how can prevent happening? instead want submenu slide if down.

please see jsfiddle: http://jsfiddle.net/o5w37zva/

your problem in selector. use below selector slideup others submenus , slides submenus in nav.

$("#nav ul") 

if use selector, need modify .not() function , remove current,$(this) element in function.

$("#nav ul").not($(".submenu-customers")).slideup(); 

with selector, if user click opened submenu, slideup only. can see demo: http://codepen.io/ogzhncrt/pen/bdypbk


Comments

Popular posts from this blog

php - Admin SDK -- get information about the group -

dns - How To Use Custom Nameserver On Free Cloudflare? -

Python Error - TypeError: input expected at most 1 arguments, got 3 -