1) Script Title: Ajax Tabs Content Script (v 2.0)
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...axtabscontent/
3) Describe problem: I am not able to get the "selected" option to work when something other then the first tab has the selected class. It always goes to the first tab. It almost looks like it loads the 2nd tab, then the first. Am I doing some thing wrong? I know I had this working with the previous version of the script (which is completely different code). When we updated to the new version this went unnoticed for a while. I went to the demo.htm code and tried to get it working with "selected" on something other then the first tab, but it eghibits the same behavior...
Here is the code I'm trying.
Code:<ul id="countrytabs" class="shadetabs"> <li><a href="external1.htm" rel="countrycontainer">Tab 1</a></li> <li><a href="external2.htm" rel="countrycontainer" class="selected">Tab 2</a></li> <li><a href="external3.htm" rel="countrycontainer">Tab 3</a></li> <li><a href="external4.htm" rel="#iframe">Tab 4</a></li> </ul> <div id="countrycontainer" style="border:1px solid gray; width:450px; margin-bottom: 1em; padding: 10px"> <p>This is some default tab content, embedded directly inside this space and not via Ajax. It can be shown when no tabs are automatically selected, or associated with a certain tab, in this case, the first tab.</p> </div> <script type="text/javascript"> var countries=new ddajaxtabs("countrytabs", "countrycontainer") countries.setpersist(true) countries.setselectedClassTarget("link") //"link" or "linkparent" countries.init(3) </script>



Reply With Quote
Bookmarks