I have a bunch of select
elements in a form with which I am using the Jquery Chosen plugin. How can I reset the form? The following does not work:
Sometimes you have to reset the select that chosen is called on.
I do this
jQuery.fn.chosen_reset = function(n){
$(this).chosen('destroy');
$(this).prop('selectedIndex', 0);
$(this).chosen(n)
}
And call this function like this, with the options as an argument
$('select').chosen_reset({width:'369px'});