How can I reset a form with jQuery chosen plugin? How can I reset a form with jQuery chosen plugin? javascript javascript

How can I reset a form with jQuery chosen plugin?


You'll need to reset the value of the field, then trigger the liszt:updated event on the input to get it to update, ive made a fiddle with a working example here.

http://jsfiddle.net/VSpa3/3/

$(".chzn-select").chosen();$('a').click(function(){    $(".chzn-select").val('').trigger("liszt:updated");});​

Since the release of chosen v1.0 the trigger is now called 'chosen:updated'. Anyone using this new version needs to trigger the update using

$(".chosen-select").val('').trigger("chosen:updated");


Since the release of chosen v1.0 the trigger is now called 'chosen:updated'. Anyone using this new version needs to trigger the update using

$(".chosen-select").val('').trigger("chosen:updated");


You could try this:

$('select').chosen('destroy');  $('select').prop("selectedIndex", -1);   $('select').chosen();