<select> that makes styling easy and consistent.
— Inspired by the blazing fast, lightweight, cross-platform and crazy popular Vanilla JS framework.
Reads the original
<select> element's options (with respect of
selected, if any), creates and attaches the pseudo-select just before the original one, and hides the original.
Upon selection it updates the original
<select>, so when you submit your form the value will be there.
|elem||yes||id of the select you want to replace or a direct DOM element|
|.toggle()||Opens the select if closed and vice-versa|
|.close()||Closes the select|
|.open()||Opens the select|
var select =elem: 'select';// open it for the userselect;
|IE & Edge||yes*||Polyfill for
* IE9 and up
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
See Unlicense for full details.