Results 1 to 7 of 7

Thread: Tab Content script: Start with a specific tab

  1. #1
    Join Date
    Nov 2005
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Tab Content script: Start with a specific tab

    1) Script Title:
    Tab Content Script

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

    3) Describe problem:

    Hi, I would like to thank DD for this nice script. I am using it with no problems.

    I wonder if I can link to a specific tab from another page. In other words, can I make the tab content div start with a specific tab?

    For example I keep the Book Info on the first tab and the comments for this book on the 4th tab.

    Can I make a link from another page (for ex. Search Results Page) like "Click to read the comments on this book" and load the page with 4th tab selected?

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

  3. #3
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Yep, just add the "selected" class to the <li> element:
    Code:
    <li class="selected"><a href="#default" rel="ajaxcontentarea">Intro</a></li>
    - Mike

  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

    Quote Originally Posted by mburt View Post
    Yep, just add the "selected" class to the <li> element:
    Code:
    <li class="selected"><a href="#default" rel="ajaxcontentarea">Intro</a></li>
    How does that, do this:

    Quote Originally Posted by guvenck View Post
    I wonder if I can link to a specific tab from another page.

    Can I make a link from another page (for ex. Search Results Page) like "Click to read the comments on this book" and load the page with 4th tab selected?
    - John
    ________________________

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

  5. #5
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Oops.. I thought the OP was reffering to this script:
    http://www.dynamicdrive.com/dynamici...tent/index.htm
    - Mike

  6. #6
    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

    Quote Originally Posted by mburt View Post
    Oops.. I thought the OP was reffering to this script:
    http://www.dynamicdrive.com/dynamici...tent/index.htm
    That still wouldn't load a tab from a link on another page with that script. The two scripts are similar and the thread that I linked to in my post:

    http://www.dynamicdrive.com/forums/s...ad.php?t=12105

    covers how to do this for both of them.
    - John
    ________________________

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

  7. #7
    Join Date
    Nov 2005
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I posted my humble PHP solution to the original thread. Thanks a lot.

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
  •