Results 1 to 3 of 3

Thread: Switch Content Script CLOSE

  1. #1
    Join Date
    Nov 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Switch Content Script CLOSE

    1) Script Title: Switch Content Script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...tchcontent.htm

    3) Describe problem:

    Im not sure how to make the Demo 2 script stay in the closed state on opening the browser? It works in Firefox but not in Safari?

    What values do I need to pass inorder to keep my div closed on load?

    Here is what I have:

    Code:
    <script type="text/javascript">
    var joeexample=new switchcontent("switchgroup", "") //Limit scanning of switch contents to just "p" elements
    joeexample.setStatus('<img src="../images/icon-hide.gif" alt="[hide]" />', '<img src="../images/icon-show.gif" alt="[show]" />')
    joeexample.setColor('', '')
    joeexample.collapsePrevious(false) //Allow more than 1 content to be open simultanously
    joeexample.setPersist(false)
    joeexample.defaultExpanded(0,1)
    joeexample.init()
    </script>

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

    Default

    Have you tried removing the line:

    Code:
    joeexample.defaultExpanded(0,1)
    The above causes the 1st and 2nd content to be expanded by default.

  3. #3
    Join Date
    Nov 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    That seemed to work!

    Thanks

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
  •