In it's simplest form, you can create a MultiSelect form control using the following code:
$(document).ready( function() {
$("#control_id").multiSelect();
}
where #control_id is the ID of the select element that exists on your page. You can use any valid jQuery selector as the ID, but make sure you only use select elements with the multiple="multiple" attribute to get the expected results.
I'm sure you all know that it's possible to create plugins and extend various aspects of the jQuery JavaScript library but did you know you could also extend the capabilities of it's selector engine?
The 'imgPreview' plugin allows your users to preview an image before clicking on it and, out of necessity, will preload the image so when a user does click through to it there is no waiting time!
The image preview shows up in a tooltip-like box appearing alongside the user's cursor when hovering over a link. The plugin is entirely unobtrusive; it does not require any hooks to target specific links (no non-semantic classes); it will automatically detect the anchors that are linking to images and will only apply the preview effect to them.