PDA

View Full Version : Accordion Content script (v1.9) - adaptation for multiple pages



fat cat
08-06-2010, 08:44 PM
Accordion Content script (v1.9)

http://www.dynamicdrive.com/dynamicindex17/ddaccordion.htm

My site contains several pages using this script for their content.

It appears that if after one piece of content is revealed, and I move from one page to another, it automatically opens the same number piece of content.
(e.g. on page A - text 3 is open. If go to page C - text 3 opens there).

I understand that there is some kind of variable(s) that script uses and that is why it is passed on from one page to another as user selects them.

But I am not any good with javascript and would like to ask about a workaround for this situation.

Possible solutions (more desirable first):

- Modify the script somehow so it understands several pages as different (may not work for me if its too complex). As a result, user will have opened texts remembered on each respective page, and if moves between them, gets forth and back to those that are open (e.g. page A text 2 is open, then goes to B opens text 4 then back to A and 2 is open there, back to B and 4 is open there).

- Modify the script somehow so it "clears" the memory each time it is loaded and user gets new page with all texts closed by default, so if he has open A text 3 then moves C then back A all texts on A are closed.

- ???

- PROFIT!!!!