Hello All! I have installed the Accordian menu, but can't figure out how to have all the Main Items and Subs be collapsed from the start, I don't want any sub-menu items showing when a visitor first lands on a page in the site, only the main categories. I am not skilled with Java, so a "dummies" explanation would be much appreciated! My first main category is open, the 2 additional categories are collapsed. Thank you in advance!
amenu.close closes just the first node of your list. Also if you do something like <script>amenu.open("li1", true);amenu.close(false);</script> like I did, it doesn�t work. That�s because the close property doesn�t change the class of the div. That�s why the first item it�s always gonna be shown. If you want all your items collapsed you have to force width = 0 as an UL property while you are creating it!!! Hope it works!!! Suits for me!! :)
Another approach is to add the following code to your page:
<script> amenu.close(false); </script>
<script> amenu.close(false); </script> do not work for me :(
Any other suggestions are welcome!!
Hi Milo, Thank you. Too simple! You're my hero!!! =)
I have try <script> amenu.close(false); </script>, but the last menu item was expand on site open.
1. Try put the link of accordionmenu.js to be the first link in the page so that the script will run earlier as soon as the page is loaded;
2. Try the #3 in http://www.menucool.com/2457/Troubleshooting-Request