darkwing / ElementFilter
- Source
- Commits
- Network (1)
- Issues (0)
- Downloads (3)
- Wiki (1)
- Graphs
-
Branch:
master
| name | age | message | |
|---|---|---|---|
| |
Docs/ | ||
| |
README.md | ||
| |
Source/ | ||
| |
package.yml |
README.md
ElementFilter
ElementFilter provides a great way for you to allow users to search through the text of any mix of elements. Simply provide a text input box and ElementFilter does the rest of the work.

How to Use
ElementFilter may be initialized at any time (usually at DOMReady). Numerous custom options may be used.
#JS
/* ElementFilter instance */
window.addEvent('domready',function() {
var myFilter = new ElementFilter('search-term', '#my-list li', {
trigger: 'keyup',
cache: true,
onShow: function(element) {
element.set('morph',{
onComplete: function() {
element.setStyle('background-color','#fff');
}
});
element.morph({'padding-left':30,'background-color':'#a5faa9'});
},
onHide: function(element) {
element.set('morph',{
onComplete: function() {
element.setStyle('background-color','#fff');
}
});
element.morph({'padding-left':0,'background-color':'#fac3a5'});
}
});
});
For specific usage and options, please read the documentation or visit http://davidwalsh.name/plugin-element-filter

