Save Expand icon

Ron Valstar
front-end developer

JavaScript unordered list folding

Below is a feature for unordered lists that I needed for our CMS. I tried searching for some good scripts but sometimes just making it yourself is way faster than searching, testing and adjusting someone elses script. Since this is quite a usefull script, and since I’ve done my share of shamelessly ‘ripping’ other peoples scripts, I thought it would be nice to share it. All you have to do is add the script in the html head and give your unordered list the classname ‘foldtree’. Further instructions are in the script itself. Here’s the download.