Results 1 to 3 of 3

Thread: Tab Content Script (v 2.2)

  1. #1
    Join Date
    Feb 2009
    Posts
    48
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Default Tab Content Script (v 2.2)

    1) Script Title: Tab Content Script (v 2.2)
    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...tabcontent.htm

    3) Describe problem:

    Not a problem actually, this script works really well. I'm working with Demo #3 and my question is, if you click on Tab 3, for instance, and then refresh/reload the page, the Tab 3 content stays clicked. Is there a way to have this default back to Tab 1 and it's content being displayed everytime the page loads?

    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

    Demo #3 by default has persistence of the tab state turned on, and hence the behavior you see. You can turn it off:

    Code:
    <script type="text/javascript">
    
    var mypets=new ddtabcontent("pettabs")
    mypets.setpersist(false)
    mypets.setselectedClassTarget("link")
    mypets.init(2000)
    
    </script>
    DD Admin

  3. The Following User Says Thank You to ddadmin For This Useful Post:

    Shammus (03-19-2009)

  4. #3
    Join Date
    Feb 2009
    Posts
    48
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Default

    Much appreciated, that worked!

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
  •