jquery-select2 Getting started with jquery-select2 To clear the selected elements of Select2 dropdown.


Example

In order to clear the selection of those values which are selected using a Select2 drop down,we can use the empty() function.

<select id="select2_example">
<option>Option1</option>
<option>Option2</option>
<option>Option3</option>
</select>

The dropdown can be reset using Jquery.

$("#select2_example").empty();

It can also be reset as below.

$("#select2_example").select2("val", "");