MultiSelectTree.js

I’ve often needed a multiselect interface for heirarchichal data, and the way I like to get my code on, I find myself wanting to overload a select multiple (even with it’s poor default behavior). I figured I can represent each node’s heirarchy in an attribute, so if the js fails to load, you are still left with a working widget (albeit flat and probably overpopulated). Also, rather than external graphics, I’d like to use textual widgets and take advantage of modern css effects, rather than load external graphics.

I personally prefer MooTools.. when I look at the code, it makes my mind juggle less to work with it, and my designs rely on objects needing a strong inheretance model. So here we go in MooTools:

But I do recognize most ‘Javascript’ developers are actually just jQuery hacks who copy and paste code. So in that spirit I offer:

It could use some work on transitions and event firing, but I was pretty pleased with the result. Enjoy!

Leave a Reply