is my attempt of a sortable multiple select widget. It depends on jQuery 1.3 and jQuery UI 1.7.
The widget is styleable using Themeroller.
It works in an unobtrusive fashion, by just turning html multiple select inputs into a sexier equivalent. There's no extra markup needed.
The source code is available at Github.
...is a cakewalk.
Add the library references.
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script> | |
<script type="text/javascript" src="js/jquery-ui-1.7.1.custom.min.js"></script> | |
<script type="text/javascript" src="js/ui.multiselect.js"></script> |
Define your selectbox having the multiple attribute set.
<select id="countries" class="multiselect" multiple="multiple" name="countries[]"> | |
<option value="AFG">Afghanistan</option> | |
<option value="ALB">Albania</option> | |
<option value="DZA">Algeria</option> | |
<option value="AND">Andorra</option> | |
<option value="ARG">Argentina</option> | |
<option value="ARM">Armenia</option> | |
<option value="ABW">Aruba</option> | |
<option value="AUS">Australia</option> | |
<option value="AUT" selected="selected">Austria</option> | |
... | |
</select> |
Invoke the Multiselect Spirits.
<script type="text/javascript"> | |
$(function(){ | |
// choose either the full version | |
$(".multiselect").multiselect(); | |
// or disable some features | |
$(".multiselect").multiselect({sortable: false, searchable: false}); | |
}); | |
</script> |
My name is Michael Aufreiter. Neither I have a website nor I have my own blog yet. Fortunately, I'm a member of Quasipartikel, a small office for data throwing affairs. We're based in Linz / Upper Austria and our website should be online pretty soon. So all fame should go there.
There are no limitations - Do whatever you want with this plugin. If you did some nice modifications, just let me know (via Github). I'd be happy to include them.