OK, for those that come after. My problem wasn’t with the javascript, my problem was weird side effects after putting any table or list inside the content sections (eg:
Section 4 Content Here
). Text would work fine. An image would work fine. A table or list would create expand icons in the wrong place, pre-expand the contents, and sometimes hide the other accordians.
This was because of where I put the div. If you place your divs like this
Section 4 Content Here
you get weird content. If you place them like this.
Low end system example
Column 1 |
Column 2 |
Column 3 |
Column 4 |
All will be fine.