10-11-2010, 09:59 PM
having some more trouble on my accordion again.
I want to (on click) open only one chapter and then on the next click on the same button close that chapter. My problem is...when i click on chapter one...chapter two opens as well and ergo closes when i click chapter 1 again.
See it here:
10-11-2010, 10:25 PM
Heres the link for the tutorial. I couldn't find why i had an error
Your best approach would be to first remove those line breaks you have between .accordionButton and .accordionContent, and instead add the following to your css:
//ACCORDION BUTTON ACTION
//HIDE THE DIVS ON PAGE LOAD
So here we apply the slide to the next element (next()) from the clicked element (this()), making sure it's the .accordionContent.
10-13-2010, 12:00 AM
Thank you for your help.
I did those changes and now the accordion doesn't open at all.
You haven't removed the line breaks as I suggested - this is necessary so that the .accordionContent is the next item within the html to the .accordionButton.
10-13-2010, 01:53 PM
Truly a genius. Thank you once again for your help with this project.