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