PDA

View Full Version : Switch content script



Joshimitsu
11-01-2006, 08:48 PM
1) Script Title:
Switch content script

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex17/switchcontent.htm

3) Describe problem:
How do i get the contents to be open on default?

ddadmin
11-01-2006, 11:56 PM
Inside function do_onload(), find and modify the below code block:


if (!firsttimeload)
revivecontent()
}
else
sweeptoggle('expand')

The code in red is new. That will cause the contents to be expanded by default, unless persistence is enabled and there is a previous state remembered. In that case that takes precedence.

Joshimitsu
11-05-2006, 09:07 AM
Also, the menu doesn't seem to stay the same when i visit a new page? just when i return to one i have visited. Can this be changed?

jscheuer1
11-05-2006, 09:45 AM
See:

http://www.dynamicdrive.com/forums/showthread.php?t=8186

Especially post 6:

http://www.dynamicdrive.com/forums/showpost.php?p=29189&postcount=6

There is a fully updated script with site-wide cookies at the end of post 6 in that thread.

Joshimitsu
11-05-2006, 07:29 PM
Dude, thats perfect! You can see it work at www.yibbe.com now! cheers!