Clear and refresh jQuery Chosen dropdown list

Using .trigger(“chosen:updated”); you can update the options list after appending. Updating Chosen Dynamically: If you need to update the options in your select field and want Chosen to pick up the changes, you’ll need to trigger the “chosen:updated” event on the field. Chosen will re-build itself based on the updated content. Your code: $(“#refreshgallery”).click(function(){ $(‘#picturegallery’).empty(); … Read more

How can I use jQuery validation with the “chosen” plugin?

jQuery validate ignores the hidden element, and since the Chosen plugin adds visibility:hidden attribute to the select, try: $.validator.setDefaults({ ignore: “:hidden:not(select)” }) //for all select OR $.validator.setDefaults({ ignore: “:hidden:not(.chosen-select)” }) //for all select having class .chosen-select Add this line just before validate() function. It works fine for me.

tech