This may be more of a jQuery question but I am essentially using XSLT to try and do what I need to do!
Basically, I have an accordian menu which opens/ closes when you select an item and I want to be able to link to different accordian items from another page... So, I click a link and it takes me to the accordian page with the specific accordian item open - I have assigned each accordian item a unique id but I need to also update the class so that the item is open - this is where I am stuck!
Using jQuery in XSLT
Hi,
This may be more of a jQuery question but I am essentially using XSLT to try and do what I need to do!
Basically, I have an accordian menu which opens/ closes when you select an item and I want to be able to link to different accordian items from another page... So, I click a link and it takes me to the accordian page with the specific accordian item open - I have assigned each accordian item a unique id but I need to also update the class so that the item is open - this is where I am stuck!
My xslt is simple...
Now, I'm not too familiar with jQuery but I think I can do something similar to this...
What I am trying to achieve is that the <li> of the accordian item has a class of 'activeitem' added to it but this needs to pass through the link!
Sorry if this is a little confusing :)
Thanks,
Rach
Hi Rachel,
I've done something similar with jQuery, but hiding and opening DIV's created by the XSLT. My XSLT is this:
Then in jQuery:
That's it in a nutshell, but if you need me to expand further please say so.
Thanks Darryl, it looks a little advanced for me but I'll have a play around with your code and see what I can achieve! :)
No worries, Just to follow up - I'm using a jQuery plug-in (jQueryString) to read the querystring which triggers the open on the appropriate content.
is working on a reply...