PDA

View Full Version : No tab activation on page load



kona
02-04-2008, 05:43 PM
Tab Content Script (v 2.0)
http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm

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

jscheuer1
02-04-2008, 05:57 PM
<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>

kona
02-04-2008, 06:06 PM
Thanks for such a quick reply!
I'll give that a try.