Results 1 to 2 of 2

Thread: Switch Content Script - having default section open

  1. #1
    Join Date
    Jun 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Switch Content Script - having default section open

    http://www.dynamicdrive.com/dynamici...tchcontent.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

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Simply locate the DIV content that you want initialy expanded, and add to it the code in red:

    Code:
    <div id="sc1" class="switchcontent" style="display:block">
    "
    </div>
    This is actually documented on the script page.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •