PDA

View Full Version : Nested Javascript Accordion




monke
Aug 4, 2008, 07:25 PM
I've used the accordion script provided by dezinerfolio (http://www.dezinerfolio.com/2007/07/19/simple-javascript-accordions/).

I have a left navigation accordion (http://www.dezinerfolio.com/wp-content/uploads/accordemo/03.html) already set up and working.
I also have a common content container accordion (http://www.dezinerfolio.com/wp-content/uploads/accordemo/02.html) set up and working.

I want to nest the common content container accordion into the left navigation according, but as soon as I do that the common content tab's won't load the content that they are supposed to.

Any ideas? :)



angelwatt
Aug 4, 2008, 07:52 PM
Do you have a page where you're testing this code that we could see?

monke
Aug 4, 2008, 08:01 PM
Do you have a page where you're testing this code that we could see?

No, I'm working on it locally only.

I'm using the exact same code as their two demo's (left navigation (http://www.dezinerfolio.com/wp-content/uploads/accordemo/03.html) and common content (http://www.dezinerfolio.com/wp-content/uploads/accordemo/02.html)) except that I changed all of the common content tags so that they wouldn't interfere with the left navigation tags. It worked until I nested it.

angelwatt
Aug 4, 2008, 08:15 PM
Unfortunately they have minified their JavaScript so it's very hard to see what might be happening when you combine the two techniques.It may have something to do with naming of classes or ids. The code likely can't tell the difference between the two accordions and so may not be able to play nice.

monke
Aug 4, 2008, 08:19 PM
Unfortunately they have minified their JavaScript so it's very hard to see what might be happening when you combine the two techniques.It may have something to do with naming of classes or ids. The code likely can't tell the difference between the two accordions and so may not be able to play nice.

Ok, I'll try fiddling around with it a bit and see if anything happens. I just wasn't sure if it was an error I made or not.