Reputation: 212
I used jquery multiselect2side select box. I used below code to add option
$("#myselect").multiselect2side('addOption', {name: opionTitle, value: libraryvalue[i].uri, selected: false});
In the same way, I want to remove all option from select box. I used below jquery script to remove. But it was not working
$("#myselect").empty();
Upvotes: 0
Views: 999
Reputation: 8346
After empty you will need to destroy and again initialize the plugin. Hope this works for you.
$('#myselect').empty().multiselect2side('destroy');
$('#myselect').multiselect2side();
Upvotes: 1