filter-component
0.0.1 • Public • Published filter
dynamic dom node filtering via callback.
Installation
$ component install component/filter
Example
When list items contain the relevant text a .hide
class is added
for styling the filter.
var filter = require('filter');
var ul = document.querySelector('ul');
var input = document.querySelector('input');
input.onkeyup = function(e){
var str = input.value;
filter(ul, function(li){
return ~li.textContent.indexOf(str);
});
};
License
MIT
Versions
Current Tags
- VersionDownloads (Last 7 Days)
- 0.0.1
3
Version History
- VersionDownloads (Last 7 Days)
- 0.0.1
3
Package Sidebar
Install
Weekly Downloads