Select Page

How to add a new options to JQuery Chosen Plugin Dynamically

If users is the id of the select Chosen dropdown box, then use JQuery to append new options dynamically as in the example below

$("#users").append('<option value="1">User</option>').trigger("chosen:updated");

.trigger(“chosen:updated”);  refreshes the Chosen dropdown box with the new option.

Last Updated On March 21, 2018

Leave a reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.