Through the encouragement of “Helen” (full name, location, website etc – unknown), I’ve been prodded into reviving an old chestnut of mine called the Collapsible Menu.
The idea of this script was that it takes menus that you create in the form of unordered lists, then it dynamically converts them into a collapsible menu.
For instance, if you have the following menu:
<ul> <li><a href="/">home</a> <ul> <li><a href="/aboutme">about me</a></li> <li><a href="/contact">contact me</a></li> </ul> </li> <li><a href="/gallery">photo gallery</a></li> </ul>
You can add in the script:
And, with no extra work, you have a collapsible menu (example).
Yes yes, I know its not new – there are many people that do that these days. But back in the day, I believe I was one of the first to do it.
Anyway – the request I had from Helen was to change the script so it was possible to remove the
[+] links and instead use the entire parent link as the opener/closer.
After much tardiness on my part (been busy and sick, in turns), I’ve done that requested work.
An example of that in action can be seen here.
That’s about it really. But, before I submit this article, here’s a nice goody – A while back, Nathan Young took the script and made a bookmarklet out of it. Try it out! Bookmark the ul collapser, go to this page, then click on the bookmark in your bookmarks list. Violin!