I want to change placeholder of a dropdown created by selectize.js when the parent dropdown changes its selection to load the options of the dropdown whose placeholder to be changed. There is no method to do this in documentation.
You can specify a placeholder
key as part of the options object when initialising. I couldn't find the option in the documentation and only found it digging through the code.
//init selectize
$(function() {
$('select').selectize({
placeholder: 'Click here to select ...',
});
});
You need two things:
<option></option>
as first option tag in the select.placeholder
key to selectize
callIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With