I have 2 Mootools challenges/issues with this site (Built with Joomla) and I would appreciate it if someone can help me out Link to the site.
As you can see, I have 4 accordion items that include some child menu items. The main issue is that the first one is opened by default regardless of which other items have been clicked and are active. For example, the aforementioned link is under the WEBBDesign accordion. What I need to accomplish is to basically check if the child link is active and open the respective parent panel.
The second issue is that I want to make the top menu item (Tjänster) active if any of the children in the accordion are active.
Thank you in advance.
I notice your call to create the accordion menu has
display: 0,
This option opens the menu with the specified index.
You need to have each page declare where it is in the accordion menu with a snippet of javascript:
and then later pass that the Fx.accordion constructor:
Consider using
showinstead ofdisplay, as according to the docs,showcreates the menu with the item already showing, rather than animating to show it, which would be redundant in this case.