jquery-ui-multiselect

Dynamically add content in the multiselect dropdown in jquery

冷暖自知 提交于 2019-12-25 06:45:00
问题 I have some doubt on multiple select in dropdown with checkbox. i want to dynamically add the content in drop down whenever i upload a image in jquery.How to refresh dropdown with new data? $('#listImage').multiselect({}); once i get the new data i tried to refresh the multiselect but that throws error. $("#widgetSettingsForm select[multiple]").multiselect('rebuild'); Uncaught Error: no such method 'rebuild' for multiselect widget instance(...) 回答1: Use refresh instead of rebuild : http:/

JQuery Bootstrap Multiselect plugin - Set a value as selected in the multiselect dropdown

帅比萌擦擦* 提交于 2019-11-26 09:19:09
问题 I am having a multiselect dropdown using the Boostrap Multiselect plugin (http://davidstutz.de/bootstrap-multiselect/) as below <select id=\"data\" name=\"data\" class=\"data\" multiple=\"multiple\"> <option value=\"100\">foo</option> <option value=\"101\">bar</option> <option value=\"102\">bat</option> <option value=\"103\">baz</option> </select> On load of page, i will get an array of value like [101,102]. I should iterate through the array and make the values selected(check boxes