I want to build a menu three levels deep with [+] boxes to expand a level and have the graphic for the [+] box become a [-] box while expanded. Clicking the [-] box will collapse that section of the menu and toggle back to being a [+] box.
It is supposed to look something like the attached image. That is, of course, only one top level section and one layer deep. The code below works for it. Problem is it relies on IDs of the plus-box image, so doesn't work as soon as I add a second level, or a second top-level. How can I code it so it accepts any number of control boxes at up to three-level tree structure?