https://github.com/madeindjs/select_option_filters
Pure Javascript filters for select html tag without Jquery dependencies
https://github.com/madeindjs/select_option_filters
Last synced: about 1 year ago
JSON representation
Pure Javascript filters for select html tag without Jquery dependencies
- Host: GitHub
- URL: https://github.com/madeindjs/select_option_filters
- Owner: madeindjs
- Created: 2016-08-23T14:56:25.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-08-24T06:39:45.000Z (almost 10 years ago)
- Last Synced: 2025-02-05T21:41:48.219Z (over 1 year ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Select Option Filter
====================
**javascript** filters for `select` html tag without Jquery dependencies.
*inspired from this [Stackoverflow question](http://stackoverflow.com/questions/27713621/how-search-into-options-of-select-tag-html-without-plugin)*
Usage
-----
### Simple search
Add simply an `input` tag before to lock all non-match value in the `section tag`
~~~html
C++
JavaScript
PHP
Python
Ruby
add_filter("combobox");
~~~
### Two section search
Extract the first word of all `option` to group them into a primary section. The second section show all possibles choices.
~~~html
C++
JavaScript
PHP
Python
Ruby
add_first_word_filter("fw_combobox", function(){
console.log('value applied');
});
~~~
Author
------
[Rousseau Alexandre][madeindjs]
License
-------
[MIT](https://opensource.org/licenses/MIT)
[madeindjs]: https://github.com/madeindjs/