lou / multi-select

A user-friendlier drop-in replacement for the standard select with multiple attribute activated.
loudev.com
MIT License
1.9k stars 438 forks source link

Add options with Selected attribute #219

Open hanynasyr opened 8 years ago

hanynasyr commented 8 years ago

Would love to see functionality which enables to add options to multiselect with selected attribute. eg.

$('#your-select').multiSelect('addOption', { value: 'test', text: 'test', index: 0, selected: 'true' });

jmjdev commented 6 years ago

While that would be nice, you can still to this by: $('#your-select').multiSelect('select', String|Array); //String being the value of the option. Array being an array of option values.