Results 1 to 2 of 2

Thread: Keep default content, when tab with no content is hovered over

  1. #1
    Join Date
    Mar 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Keep default content, when tab with no content is hovered over

    1) Script Title: DD Tab Menu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/ddtabmenu.htm

    3) Describe problem:

    The "Forums" and "GIF Optimizer" tabs do not have any content to reveal when the user mouses over the tab, so it displays an empty, white-space.

    Is there a way to leave the default content displayed, the "Home" tab in Example 1 for example, when one of these tabs is hovered over?

    Thanks in advance for any tips!

  2. #2
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    You can do this by setting the same "rel" attribute that you've specified for the 'Home' item even for 'Forums' and 'Gif Optimizer' items. Check the following code copied from the demo page of the script:

    Code:
    <div id="ddtabs1" class="basictab">
    <ul>
    <li><a href="http://www.dynamicdrive.com" rel="sc1">Home</a></li>
    <li><a href="http://www.dynamicdrive.com/new.htm" rel="sc2">DHTML</a></li>
    <li><a href="http://www.dynamicdrive.com/style/" rel="sc3">CSS</a></li>
    <li><a href="http://www.dynamicdrive.com/forums/">Forums</a></li>
    <li><a href="http://tools.dynamicdrive.com/imageoptimizer/">Gif Optimizer</a></li>
    </ul>
    </div>
    If you look at the 'Home' item you can see that its 'rel' attribute has a value of 'sc1' but there is no such attribute for 'Forums' and 'Gif Optimizer' items (rest of the items have that values). You can set a 'rel' attribute value for 'Forums' and 'Gif Optimizer' items like the following manner

    Code:
    <div id="ddtabs1" class="basictab">
    <ul>
    <li><a href="http://www.dynamicdrive.com" rel="sc1">Home</a></li>
    <li><a href="http://www.dynamicdrive.com/new.htm" rel="sc2">DHTML</a></li>
    <li><a href="http://www.dynamicdrive.com/style/" rel="sc3">CSS</a></li>
    <li><a href="http://www.dynamicdrive.com/forums/" rel="sc1">Forums</a></li>
    <li><a href="http://tools.dynamicdrive.com/imageoptimizer/" rel="sc1">Gif Optimizer</a></li>
    </ul>
    </div>
    This will display the default value of the 'Home' item instead of an empty space.

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
  •