试试这个方法:
$(document).ready($(function() {
$('select[id="nazev_' + <?php echo $i; ?> + '"]').selectize({
sortField: 'text',
onInitialize: function() {
var s = this;
this.revertSettings.$children.each(function() {
$.extend(s.options[this.value], $(this).data());
});
}
});
}));