Results 1 to 5 of 5

Thread: Tabbed Content: default tab?

  1. #1
    Join Date
    Feb 2008
    Location
    Native and current resident of beautiful, quiet and clean Montana.
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Tabbed Content: default tab?

    1) Script Title:
    Tab Content Script (v 2.2)

    2) Script URL (on DD):
    Right over here

    3) Describe problem:
    I'm using tabbed content on a number of pages for a site I'm building. My goal is to have the first tab selected by default each time any of those pages are loaded. As it is now, if I visit a page and select the 3rd tab...the next page I visit will have the 3rd tab selected instead of the 1st. How can I adjust the persistence/default tab for this script? I currently have each page referencing its own .js and other support files in uniquely named directories....I thought that having multiple pages referencing the same .js file might lead to this, but it didn't help.

    For what it's worth, I had a very similar issue regarding the Accordion script, but attempting the same fix doesn't work here.

    Thanks in advance.

  2. #2
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default

    find this:
    Code:
    this.enabletabpersistence=true
    and also make sure that you have the first tab set as default:
    Code:
    <ul id="flowertabs" class="shadetabs">
    <li><a href="#" rel="tcontent1" class="selected">Tab 1</a></li>
    <li><a href="#" rel="tcontent2">Tab 2</a></li>
    <li><a href="#" rel="tcontent3">Tab 3</a></li>
    <li><a href="#" rel="tcontent4">Tab 4</a></li>
    <li><a href="http://www.dynamicdrive.com">Dynamic Drive</a></li>
    </ul>
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

  3. #3
    Join Date
    Feb 2008
    Location
    Native and current resident of beautiful, quiet and clean Montana.
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for your quick reply, Nyne. I checked my files and it looks good on my end, including the persistence set to "true":

    Code:
    <ul id="countrytabs" class="shadetabs">
    <li><a href="#" rel="country1" class="selected">Definition</a></li>
    <li><a href="#" rel="country2">Duties</a></li>
    <li><a href="#" rel="country3">Training</a></li>
    <li><a href="#" rel="country4">Applications</a></li>
    <li><a href="#" rel="country5">Appreciation</a></li>
    </ul>
    Ersh...what would you suggest next? Thanks again.

  4. #4
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default

    I guess I should have been more clear... If the persistence is set to "true", then it is going to remember the last tab clicked. Set it to "false".
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

  5. #5
    Join Date
    Feb 2008
    Location
    Native and current resident of beautiful, quiet and clean Montana.
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank, Nyne. I changed it to "false" and am still having the same result. I've now changed it back so all pages calling the tabscontent.js are pointed toward the same file...doesn't help either.

    Just to make sure, is the value here correct?
    Code:
    this.currentTabIndex=0
    Is there a difference between "=0" and "=[0]"? This is a total bummer...the site is essentially complete except for this. I appreciate your input though, Nyne, and hope maybe you have one more trick up your sleeve. Thanks.

    For reference, here's the site in a testing space. To test it, just go to the Volunteer page and click the second or third tab, then go to the News page. You will see that whatever tab you clicked last on the Volunteer page is the one selected by default on the News page...
    Last edited by touchnova; 08-18-2008 at 12:49 AM. Reason: added URL

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
  •