我有一堆select
个元素,它们的形式是I am using the Jquery Chosen plugin.如何重置表单?以下情况不起作用:
<input type="reset" />
我有一堆select
个元素,它们的形式是I am using the Jquery Chosen plugin.如何重置表单?以下情况不起作用:
<input type="reset" />
你需要重置字段的值,然后触发输入上的liszt:updated
事件以使其更新,我在这里修改了一个工作示例.
$(".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");