Results 1 to 3 of 3

Thread: Tab Content Script - links

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

    Cool Tab Content Script - links

    1) Script Title: Tab Content Script

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

    3) Describe problem: I would like to add a link in the content of tab 1 to link to tab 2 or 3.
    I tried using the same link defined for the tabs, but it doesn't work elsewhere on the page.
    <li><a href="#" rel="tcontent3">Tab 3</a></li>

    Any help is appreciated.

    Thanks!

  2. #2
    Join Date
    Aug 2004
    Posts
    9,918
    Thanks
    3
    Thanked 969 Times in 957 Posts
    Blog Entries
    15

    Default

    I should probably update this script to support things like this more generically, but in the meantime, such as link would look like this:

    Code:
    <a href="javascript:expandcontent(document.getElementById('maintab').getElementsByTagName('a')[1])">test</a>
    Where "maintab" is the ID of the main UL element of the tab interface, and "1" indicates you want the second tab selected when the link is clicked on. "2" would mean the 3rd and so on.

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

    Default

    Thank you ddadmin.

    That is exactly what I was hoping to do! Guess I'll have to learn more about JavaScript...

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
  •