jQuery Combo Select Redux
As a followup to my previous post on creating comboselect boxes in jQuery, I have automated the process of transforming a normal multiselect input element into a comboselect with the (aptly named) comboselect plugin.
With the plugin, you start with a normal select input, and transform it using a few simple options. You can decide which sides get resorted after a change (none, left, right, or both), and also specify the labels for the buttons which control movement from left to right and vice versa. You can also move items from side to side by double clicking them. The default sort option is “both”, and the default button labels are “>” and “<”. The plugin passes the list of selected items back to the original form input, so the form submission works the same regardless of whether the plugin is used.
Sample usage is as simple as:
$('#somelist').comboselect();
Or, with options:
$('#somelist').comboselect({
sort: 'right',
addbtn: ' Add ',
rembtn: ' Remove '
});
To see the plugin in action, check out this simple demo page:
http://devblog.jasonhuck.com/assets/comboselect_plugin/
You can download the comboselect plugin here:
http://plugins.jquery.com/project/comboselect
The download contains the source of the demo, including a sample CSS file and the Selso plugin, which is required for sorting.















Wow, this is really nice. It doesn’t have the whizbang of a usual plugin, but it’s just the right level of implementation. From here, css can take over and make it gorgeous. Nice work! Man I love JQuery.
[…] jQuery Combo Select Redux (tags: jquery) […]
[…] jQuery Combo Selector […]
Nice work man. I just wished I saw this long time ago. I made a completely similar function last year using javascript only. Back when jQuery still isnt around. Thanks anyway