zelect
zelect copied to clipboard
Is there a way to add autofocus?
I need it to replace an old select-to-autocomplete script which is used to choose employee name. And I need it to auto-focused on page load.
Right now I have solved it like this:
$('.zelect .placeholder').click();
But this is obviously not a good way to do things. It would be best if it could parse autofocus attribute from the original <select> tag.
Thanks!
I'll look into this next time I get a chance.
To clarify, you would like the zelect to be initially rendered in the "open" state, showing the search input and the list of options?
I think just a focus on the field so user could start typing in right away is enough.