PDA

View Full Version : nesting with ajaxtab



jackavin
10-24-2007, 02:21 AM
1) Script Title:
ajaxtabs 2
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/ajaxtabs_suppliment2.htm
3) Describe problem:

if i have 10 tabs in the 2nd sub-level tabs and 20 in the 3rd sub-level tabs

do i have to put all this code 1 by 1 thank

countries.onajaxpageload=function(pageurl){
if (pageurl.indexOf("menu_contact.php")!=-1){
var provinces=new ddajaxtabs("subtab", "ajax2")
provinces.setpersist(true)
provinces.setselectedClassTarget("linkparent") //"link" or "linkparent"
provinces.init()
}

ddadmin
10-24-2007, 07:47 AM
You would need to do the above for each level. For example, the below is a 3 level nested tabs declaration:


countries.onajaxpageload=function(pageurl){
if (pageurl.indexOf("menu_contact.php")!=-1){
var provinces=new ddajaxtabs("subtab", "ajax2")
provinces.setpersist(true)
provinces.setselectedClassTarget("linkparent") //"link" or "linkparent"
provinces.init()
provinces.onajaxpageload=function(pageurl){
if (pageurl.indexOf("test.php")!=-1){
city.setpersist(true)
city.setselectedClassTarget("linkparent") //"link" or "linkparent"
city.init()
}
}
}
}

jackavin
10-24-2007, 05:27 PM
i got it