After digging around for a good menu for my intranet website, I decided to build up my own as I found the div toggling function in jQuery. Yes, with jQuery.slideToggle() and just a few lines of code, you could create a stunning vertical accordion-like menu in minutes. Just play around with the menu below and see.
How to do:
1. Insert this JavaScript code block wherever between the header tags
[code lang="javascript"]
[/code]
2. Create a “topmenu – submenu” pair as below.
[code lang="html"]
[/code]
3. That’s it, you’ve just created your first accordion menu item. Repeat step 2 to create as many menu items as you like to make a nice menu.
Thanks Fahad Ibnay Heylaal for his original toggle tutorial.
