Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript [Solved] Issue with jQuery slideToggle 'display: none' Reply To: [Solved] Issue with jQuery slideToggle 'display: none'

#235813
perludum
Participant

Thank you guys for this nice piece of code, it’s still fresh.
I made a little update adding a few features:

  • The accordion now works with variable content heights by using max-height.
  • Opening an accordion section automatically closes the other ones.
  • Window scrolls to the top of the opened accordion section by using anchors (might be useful on mobile devices).

Here’s the new jsfiddle, based on Podders:

http://jsfiddle.net/perludum/y48ypLLu/