Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

selectize in ajax call

// initialize the Selectize control
var $select = $('select').selectize(options);

// fetch the instance
var selectize = $select[0].selectize;

$ajax.success = function(data) {
  selectize.clearOptions();
  for (var i in data) {
    selectize.addOption(i, data[i]);
  }
  selectize.refreshOptions()
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #selectize #ajax #call
ADD COMMENT
Topic
Name
6+5 =