PDA

View Full Version : Switch Content Script - having default section open



saorsa
06-14-2006, 03:04 PM
http://www.dynamicdrive.com/dynamicindex17/switchcontent.htm

Hi, I have setup the script in my page and it works fine. However, I would like to have one text section opened by default whenever the page loads, but currently, they are all closed (or if I use the other version of this script, they can all be open).

Is there a way for me to set a section to be displayed the first time a user visits the page? I have had a look through other entries on the forum and cant find anything that would work.

thanks in advance

ddadmin
06-15-2006, 07:05 AM
Simply locate the DIV content that you want initialy expanded, and add to it the code in red:


<div id="sc1" class="switchcontent" style="display:block">
"
</div>

This is actually documented on the script page.