mootools accordian
- Started
- Last post
- 5 Responses
- bigtrick0
thinking out loud here, you could have js read the url on pageload, and if it's at a named anchor, expose that section of accordion. like if your side was flashbender.com/accordion.html, and if you click on the first section of the accordion it loads accordion.html#firstsection, you could then rip anything past the # off of the url on pageload.
i wonder if i'm explaining myself clearly.
- vaxorcist0
If you're not a codehead, (or even if you are) you'll probably find jquery easier than mootools.
If hitting the BACK button causes a page reload, you could dyanamically write the HTML based on cookie set in the javascript... sorry to go all geeky on you though, you probably just want a simple answer...
- monNom0
you can use the write/read to a hash value (like an anchor), but IE will not see it, as it handles the history array differently and only writes to it on user action (not javascript).
You'll likely need to edit the Mootools source to return an index value to the "onActive" parameter of Accordion. Just search for 'Accordion' in the source and follow through to 'onActive', s/b pretty straight forward to pass the value through.
- that last bit is so you can find out which item is the active item.monNom
- dajaniel0
This isn't going to be much help to you, but functionally you'll have to write a cookie when the user selects a section, and then read the cookie back on each page visit.
This is pretty easy on jQuery (using http://plugins.jquery.com/projec…) but sadly I know nothing about mootools.
- flashbender0
yeah, that's what I figured. I found a couple examples that were designed to be used with the old version of mootools, but I can't get it to work with the new one... so yeah, i'll have a look at handling some cookies.
Thanks