folderselect.js is a jQuery plugin that let's you display hierarchical data in a folder structure similar to the explorer in Windows. The goal with this plugin was to have a kind of hierarchical select box. I couldn't find any plugin like that out there, so I decided to write one myself. You can find a demo of the plugin below.

folderselect.js supports ajax loading, event callbacks, data headers, and more.

Source code and documentation can be found at github




How it works

The data for the select box is given as a json object. It is converted to an adjacency list with ids and parent ids. Each folder and item is then marked as open/selected based on the user input. Whenever a change like that is made, the select box is redrawn.