PDA

View Full Version : Tab Content default Tab



hrishi
06-19-2013, 09:11 AM
Hi,

Tab Content default Tab on page opening is Tab1.
If I want to set default Tab as Tab2, what changes I have to make in tabcontent.js.
I have attached this file, please suggest.

Thanks.

ddadmin
06-19-2013, 06:18 PM
Warning: Please include a link to the DD script in question in your post, in this case, http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm. See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a question.

To your question, to change the default selected tab when the page initially loads, just give the menu item in question a CSS class of "selected", for example:


<div id="flowertabs" class="modernbricksmenu2">
<ul>
<li><a href="#" rel="tcontent1">Tab 1</a></li>
<li><a href="#" rel="tcontent2" rev="flowernote,flowernote2">Tab 2</a></li>
<li><a href="#" rel="tcontent3" class="selected">Tab 3</a></li>
<li><a href="#" rel="tcontent4" rev="flowernote3">Tab 4</a></li>
<li><a href="http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm">Tab Content</a></li>
</ul>
</div>