0

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();
Manivasagan
  • 212
  • 1
  • 6
  • 17
  • check this http://stackoverflow.com/questions/1857781/best-way-to-unselect-a-select-in-jquery –  Apr 09 '13 at 05:04

1 Answers1

1

After empty you will need to destroy and again initialize the plugin. Hope this works for you.

$('#myselect').empty().multiselect2side('destroy');
$('#myselect').multiselect2side();
msapkal
  • 8,268
  • 2
  • 31
  • 48