My project has a button that append select option in page im using jqueryniceselect in my project but When my select option is append niceselect not work this select option im update and refresh niceselect but not work.
$(document).ready(function() {
$('select').niceSelect();
});
function outputrecord() {
str='';
str +='<select class="nicslc" >';
str +='<option data-display="Select">Nothing</option>';
str +='<option value="1">Some option</option>';
str +='</select>';
return str;
$(".nicslc").niceSelect('update');
$(".nicslc").niceSelect('refresh');
}
<select>
<option data-display="Select">Nothing</option>
<option value="1">Some option</option>
<option value="2">Another option</option>
<option value="3" disabled>A disabled option</option>
<option value="4">Potato</option>
</select>
my append btn code
$('.passengers-info-box').append(outputrecord());
for live example