![]() |
Spry Accordion issue with links and open panels
Hi, I am using a spry accordion as a navigation bar. The tabs are the main links and I have sub-links inside the content panels.
The problem is that although I am using script to specify which panel I want to be open on each page, when I go to that page it only highlights the tab, showing that it is selected but not open. This means you then have to click the tab again in order to open the sub menu. I want the content panel to be open on those pages that are linked to by a sub menu. This is the code I am using, according to the multiple sites I have found it it SHOULD open the panel, but it doesn't: Code:
<script type="text/javascript"> var Accordion1 = new Spry.Widget.Accordion("Accordion1", { enableAnimation: true, useFixedPanelHeights: false, defaultPanel: 4 }); </script>Code:
Spry.Widget.Accordion = function(element, opts) |
, just fyi this is not jQuery it's an adobre product typically included with dreamweaver.
I looked at the documentation and it doesnt appear to have such an option by default. ( http://labs.adobe.com/technologies/s...dion_overview/) you could maybe assign functions o each panel programatically. Code:
<input type="button" onclick="acc10.openFirstPanel()" >open first panel</input> |
Thank you that is very helpful! However because I'm such a noob I'm not sure where I should put the code or how to customise it to work for each page. Would you mind explaining in a bit more detail for me?
Thank you! |
Never mind, I have figured it out! The code I was using was correct, I just had conflicting js just above it. Thanks for your help.
|
| All times are GMT +1. The time now is 06:03 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.