Results 1 to 3 of 3

Thread: tab content links...mystified

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

    Default tab content links...mystified

    Tab Content Script

    http://www.dynamicdrive.com/dynamici...tabcontent.htm

    I've got this up and working nicely, great script. But I'm mystified by one thing....

    The instructions/ code say links between the tabs should be written thus:

    <li><a href="#" rel="tcontent2">Tab 2</a></li>

    so, at the bottom of the contents of one of my tabs I added a link to go straight to the next tab (because the scroll means the tabs have gone out of view):

    <li><a href="#" rel="tcontent2">Next...</a></li>

    But this link doesn't go to the next tab at all, it just goes to the top of the page, and the page still displays tab 1 and its contents (the 'selected' tab)

    Why does the link not work? The link code and destination is exactly the same, only the link text is changed?

    Mystified....!

    Hugh

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

    Default

    rel="tcontent2" only has special meaning when it's inserted inside links within the menu tabs container, not elsewhere on the page such as the content container. For the later, you need to call:

    Code:
    instance.expandit(tabid_or_position)
    instead, such as:

    Code:
    <a href="javascript:myflowers.expandit(1)">Select 2nd Tab</a>
    Where "myflowers" is the variable used for this tab content instance, and "1" denotes the 2nd tab. For more info, see the section "Dynamically selecting a tab anywhere on your page" on the script page.
    DD Admin

  3. #3
    Join Date
    Aug 2005
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    roger dodger, thanks for that, I'll give it a whirl

    cheers, H

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
  •