View Full Version : Keeping collapsible menu open after refresh

Rodrigo Rego
02-16-2012, 09:27 PM
1) Animated Collapsible DIV v2.4

2) http://www.dynamicdrive.com/dynamicindex17/animatedcollapse.htm

3) I'm using Animated Collapsible DIV on this website: http://gabirocha.com/portfolio

It works like charm, except for the first menu item. I'd like the menus to keep open after you change pages, and all of the other menu items do that. The first one always hides when you refresh.

Does anyone has a clue how to solve this?

Thanks in advance.

02-20-2012, 07:19 AM
There may be other issues, but from what I can tell, one of them is that you've registered a non existent element as a collapsible DIV inside the initialization code of the script:

animatedcollapse.addDiv('1', 'fade=1,group=p')
animatedcollapse.addDiv('2', 'fade=1,group=p')
animatedcollapse.addDiv('3', 'fade=1,group=p')
animatedcollapse.addDiv('4', 'fade=1,group=p')
animatedcollapse.addDiv('5', 'fade=1,group=p')
animatedcollapse.addDiv('6', 'fade=1,group=p,persist=1')
animatedcollapse.addDiv('7', 'fade=1,group=p')
animatedcollapse.addDiv('8', 'fade=1,group=p')

The element with ID="2" doesn't exist on the page. You should either remove the line in red above, or define the element.