PDA

View Full Version : Accordion



antoncornel
04-04-2008, 09:28 PM
1) Script Title: Accordion
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...daccordion.htm
3) Describe problem:
I have two questions:
1. is ddaccordion.js 1.3 on the server for download (i am in doubt because there's no changed log)
2. with the 'onopenclose'-function i want to open the URL linked in the header. I use this script:
onopenclose:function(header, index, state, isclicked){
if (state=="block" && isclicked==true)
window.location.assign(header.getAttribute('href'))
}
}

What's wrong?

ddadmin
04-04-2008, 09:42 PM
1) Yes, the changed log is near the top of the .js file actually.
2) Instead of:


window.location.assign(header.getAttribute('href'))

It should be something like:


window.location.replace(header.getAttribute('href'))

antoncornel
04-05-2008, 08:20 AM
1. Are you sure, because the text at the top of the .js just says:

//Accordion Content script: By Dynamic Drive, at http://www.dynamicdrive.com
//Created: Jan 7th, 08'

2. I tried:

onopenclose:function(header, index, state, isclicked){
if (state=="block" && isclicked==true){
window.location.replace(header.getAttribute('href'))
}
}

but it doesn't work. More ideas?

ddadmin
04-05-2008, 02:29 PM
Hmm the .js file that's listed and available to download at the main script page (http://www.dynamicdrive.com/dynamicindex17/ddaccordion.htm) should have:


//Accordion Content script: By Dynamic Drive, at http://www.dynamicdrive.com
//Created: Jan 7th, 08'
//Version 1.3: April 3rd, 08':
//**1) Script now no longer conflicts with other JS frameworks
//**2) Adds custom oninit() and onopenclose() event handlers that fire when Accordion Content instance has initalized, plus whenever a header is opened/closed
//**3) Adds support for expanding header(s) using the URL parameter (ie: http://mysite.com/accordion.htm?headerclass=0,1)

listed at the top. Are you not seeing this?

antoncornel
04-06-2008, 09:15 AM
You are right. I'm sorry, i should have refreshed my cache.
But unfortunately the new script generates an error. It seems that it can't be used together with Thickbox and that's strange (?) because they both use the Jquery-library. Is there a solution?

Update: i found a solution. I left out: "jQuery.noConflict()" and it works allright!