Advanced Search

Results 1 to 3 of 3

Thread: No tab activation on page load

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

    Default No tab activation on page load

    Tab Content Script (v 2.0)
    http://www.dynamicdrive.com/dynamici...tabcontent.htm

    It it possible to set up a page so that none of the tabs are activated when the page initially loads?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,690
    Thanks
    43
    Thanked 3,129 Times in 3,095 Posts
    Blog Entries
    12

    Default

    Code:
    <h3>Demo #1- Basic implementation</h3>
    
    <ul id="countrytabs" class="shadetabs">
    <li style="display:none;"><a href="#" rel="country0" class="selected">Tab 0</a></li>
    <li><a href="#" rel="country1">Tab 1</a></li>
    <li><a href="#" rel="country2">Tab 2</a></li>
    <li><a href="#" rel="country3">Tab 3</a></li>
    <li><a href="#" rel="country4">Tab 4</a></li>
    <li><a href="http://www.dynamicdrive.com">Dynamic Drive</a></li>
    </ul>
    
    <div style="border:1px solid gray; width:450px; margin-bottom: 1em; padding: 10px">
    
    <div id="country0" class="tabcontent"></div>
    
    <div id="country1" class="tabcontent">
    Tab content 1 here<br />Tab content 1 here<br />
    </div>
    
    <div id="country2" class="tabcontent">
    Tab content 2 here<br />Tab content 2 here<br />
    </div>
    
    <div id="country3" class="tabcontent">
    Tab content 3 here<br />Tab content 3 here<br />
    </div>
    
    <div id="country4" class="tabcontent">
    Tab content 4 here<br />Tab content 4 here<br />
    </div>
    
    </div>
    
    <script type="text/javascript">
    
    var countries=new ddtabcontent("countrytabs")
    countries.setpersist(true)
    countries.setselectedClassTarget("link") //"link" or "linkparent"
    countries.init()
    
    </script>
    - John
    ________________________

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

  3. #3
    Join Date
    Feb 2008
    Posts
    13
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Thanks for such a quick reply!
    I'll give that a try.

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
  •