PDA

View Full Version : Tab Content Script - Linking tabs with text



helen85
12-18-2010, 08:11 PM
1) Tab Content Script (v 2.2)

2) http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm

3) Describe problem:

Hello

I am trying to dynamically select a tab content anywhere on my web page, however I have followed the example and its not working :confused: Could anyone help me out? Here is what I have:


<li><a href="javascript:aboutsfa.expandit('contact')">Contact Us</a></li>

<div align="center">
<ul id="aboutsfa" class="shadetabs">
<a href="#" rel="country1" id="venue" class="selected">Our Venue</a>
<a href="#" rel="country2" id="contact">Contact Us</a>
<a href="#" rel="country3" id="join">Join Us</a>
<a href="#" rel="country4" id="question"> Ask a Question</a>
<a href="#" rel="country5" id="openshoot">SFA Open Shoots</a>
<a href="#" rel="country6" id="getd">Get Directions</a>
<a href="http://www.serafinafieldarchers.co.uk/">Example



The example of how to do this is on the DD URL above, Sorry if it's a simple error :rolleyes:


Thank you for your help :D

ddadmin
12-19-2010, 05:45 PM
Your syntax is incorrect. The code to call to dynamically select a tab is:


instance.expandit(tabid_or_position)

where instance is the variable name you used when initializing that particular tab content instance on the page, for example:


var myflowers=new ddtabcontent("flowertabs") //enter ID of Tab Container
myflowers.setpersist(true) //toogle persistence of the tabs' state
myflowers.setselectedClassTarget("link") //"link" or "linkparent"
myflowers.init(3000)