Results 1 to 2 of 2

Thread: Switch Content script II

  1. #1
    Join Date
    May 2007
    Posts
    31
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Switch Content script II

    1) Script Title: Switch Content Script II (icon based)

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

    3) Describe problem: I can not get the Persist to work. Everything else works fine except this feature. How do I get it to remember which section is expanded? Here's settings and initialization part of the script...

    <script type="text/javascript">
    var section=new switchcontent("switchgroup1", "div")
    section.setStatus('<img src="../../media/hide.gif" /> ', '<img src="../../media/show.gif" /> ')
    section.collapsePrevious(false)
    section.setPersist(true, 365)
    section.init()
    </script>

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

    Default

    Do you have multiple switch content instances on the same page? If so, remember that the variable "section" cannot be repeated, and must be unique for each instance. Other than that, it should work...

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
  •