I have ranted in the past about people who see a nested list and think "that needs to have little pluses and minuses in it to make it dynamically browsable!"

I stand by that rant. 95% of the time it's absolutely unnecessary. However, in some cases it really might come in handy — and in a lot of other cases people just like the shiny. So I thought to myself: now that I know more about JavaScript (and have discovered the magic of Prototype), how could I improve this?

The result is my CollapsibleList utility. No more mucking around with 'onclick' attributes — simply drop in the script and a bit of CSS, call "new CollapsibleList('myListID');", and Robert's your parent's sibling.

Bonus features: javascript calls to expand entirely, collapse entirely, or collapse to a specific level. Magical pluses and minuses automatically keep up.
.

Profile

spudtater: (Default)
spudtater

Most Popular Tags

Powered by Dreamwidth Studios

Style Credit

Expand Cut Tags

No cut tags