Results 1 to 5 of 5

Thread: Switch content script

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

    Default Switch content script

    1) Script Title:
    Switch content script

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

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

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

    Default

    Inside function do_onload(), find and modify the below code block:

    Code:
    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.

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

    Default

    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?

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    See:

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

    Especially post 6:

    http://www.dynamicdrive.com/forums/s...89&postcount=6

    There is a fully updated script with site-wide cookies at the end of post 6 in that thread.
    Last edited by jscheuer1; 11-05-2006 at 09:53 AM.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Nov 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Dude, thats perfect! You can see it work at www.yibbe.com now! cheers!

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
  •