Author Topic: Jquery accordion - active element  (Read 5393 times)

Offline friet

  • Posts: 12
Jquery accordion - active element
« on: October 08, 2009, 01:58:34 PM »
I'm using the show_menu2 function to make a jquery accordion menu.
My menu looks like this:


You get the idea.
This is my accordion code:
Code: [Select]
<script type="text/javascript">
    $("#accordion").accordion({ autoHeight: false });
and the menu code:
Code: [Select]
$menuestring1='[if(level==3){<h3><a href="#">[menu_title]</a></h3>} else {<li><a href="[url]">[menu_title]</a></li>}]';

It's based on some code i got from the forum.

Now the problem is, when i click on subpage 3, I want the second accordion-part to be open when my browser loads that page. In the accordion you can define what part should be open (with active: <number>) but how do I detect on what subpage I clicked thus what accordionpart should be opened?
« Last Edit: October 08, 2009, 02:02:50 PM by friet »