javascript - Bootstrap side menu navigation issue -
i have totally 5 pages site. in that, 2 main pages have sub menus/pages.
i using + , - icons users know there sub menus in website.
when click on submenu li toggles + , - icon. however, when click on + button , 1 time again click on sec + button previous submenu closes icon not changing - +.
jquery:
if (li.hasclass("open") && li.children("ul:visible").size()) { li.children("ul").slideup().parent('li').removeclass("open"); li.children("ul").slideup().parent('li').children("a").children("span").removeclass("open") ; } else { li.children("ul").slidedown().parent('li').addclass("open"); li.children("ul").slidedown().parent('li').children("a").children("span").addclass("open"); }
html page structure:
home about services 3.1 service 1 3.2 service 2 works 4.1. works1 4.2. works 2 contacti using bootstrap 3. looking side menu similar http://startbootstrap.com/template-overviews/sb-admin-2/
i made work controlling in css itself.
javascript jquery html twitter-bootstrap
No comments:
Post a Comment