PDA

View Full Version : Tab Content Script (v 2.2) more than once on a page



Iceboy4love
06-10-2009, 03:39 PM
1) Script Title: Tab Content Script (v 2.2) more than once on a page

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm

3) Describe problem:
Hi i want to use the tab content script for describing items.
My problem is i want to put the tab content 10 times on one page .
Because i got 10 items per page .
It is working if i put just one on my site .
But if i put more than one the others wont work.
U can see all 10 tab content scripts but 9 of them doesnt show the content (Describing part) and u cant click on the tabs that they switch from tab1 to tab2.

What do i have to change?????

I have got here all files what u need. Just download it.
In there are 2 .html the first index.html is just one Tab content script in it
and the second is indexproblem.html there are 5 tab contents in it 4 of them doesnt work u see them only thy dont show the content.
Here (http://www.file-upload.net/download-1694371/tabs3.rar.html)

Thanks

ddadmin
06-11-2009, 04:30 AM
The script does support multiple instances on the same page, though you need to make sure each instance contains its own unique IDs for the concerned HTML elements, plus unique variable names when initializing each instance. In other words, the code in red needs to be unique for each instance:


var countries=new ddtabcontent("countrytabs")
countries.setpersist(true)
countries.setselectedClassTarget("link") //"link" or "linkparent"
countries.init()