Quick way to clear all selections on a multiselect enabled with jQuery?

Simply find all the selected <option> tags within your <select> and remove the selected attribute:

$("#my_select option:selected").removeAttr("selected");

As of jQuery 1.6, you should use .prop instead of removing the attribute:

$("#my_select option:selected").prop("selected", false);

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)