WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • jQuery »
  • Jquery accordion - active element
  • Print
Pages: [1]   Go Down

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

friet

  • Guest
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:

Page1
-Subpage1
-Subpage2
Page2
-Subapge3
etc...

You get the idea.
This is my accordion code:
Code: [Select]
<script type="text/javascript">
  $(document).ready(function(){
    $("#accordion").accordion({ autoHeight: false });
  });
</script>
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>}]';
                            $menuestring2='[if(level>3){<div><ul>}]';
                            show_menu2(0,SM2_ROOT+3,SM2_START+2,SM2_ALL|SM2_PRETTY,$menuestring1,'',$menuestring2,'</ul></div>','','');

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 »
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • jQuery »
  • Jquery accordion - active element
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2