184 |
Overview
185 |
jQuery plugin that converts <select> input with attribute multiple into group of checkboxes with ability to add new values.
186 | Requires jQuery UI styles (jQuery UI JS is not required).
187 |
188 |
How to use
189 |
Here’s a simple example:
190 |
191 | <select multiple="on" size="5" name="color">
192 | <option value="white">White</option>
193 | <option value="black" selected="selected">Black</option>
194 | <option value="red">Red</option>
195 | </select>
196 |
197 | $('select[name="color"]').multiselect();
198 |
199 | or
200 |
201 | var opts = { ... }
202 | $('select[name="color"]').multiselect(opts);
203 |
204 |
Options
205 |
206 |
207 | | Key |
208 | Value |
209 |
210 |
211 | | layout |
212 | Widget layout template |
213 |
214 |
215 | | item |
216 | List item layout template |
217 |
218 |
219 | | addText |
220 | Text for "New value" button/link |
221 |
222 |
223 | | cancelText |
224 | Text for "Cancel" icon in text field |
225 |
226 |
227 | | inputTitle |
228 | Text for input tooltip |
229 |
230 |
231 | | size |
232 | How many items show in widget without scroll (used if select has no "size" attribute) |
233 |
234 |
235 | | itemHoverClass |
236 | Hover class for list items |
237 |
238 |
239 | | toggleAddButton |
240 | Hide "New value" button when text field is visible |
241 |
242 |
243 | | parse |
244 | Function. Parse new list value and return values array. By default - split value by space(s) |
245 |
246 |
247 |