An open API service indexing awesome lists of open source software.

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

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/