Can you include some changes that will help event handling with validation?
I added a local method to handle updates
// update method for autocomplete function update() { $(this).niceSelect("update"); }
In the create_nice_select method, I added a binding that will call that local method when the select is changed:
$select.bind("change", update);
I unbound it back up in the string method handler (so when you call the destroy method:
$select.unbind("change", update);
lastly, I added the blur functionality to the part when you close when clicking outside.
$('.nice-select').prev('select').trigger('blur');
Thanks,
Robert
Can you include some changes that will help event handling with validation?
I added a local method to handle updates
// update method for autocomplete function update() { $(this).niceSelect("update"); }In the create_nice_select method, I added a binding that will call that local method when the select is changed:
$select.bind("change", update);I unbound it back up in the string method handler (so when you call the destroy method:
$select.unbind("change", update);lastly, I added the blur functionality to the part when you close when clicking outside.
$('.nice-select').prev('select').trigger('blur');Thanks,
Robert