Skip to content

Instantly share code, notes, and snippets.

@cowboy
Created July 23, 2010 15:53
Show Gist options
  • Select an option

  • Save cowboy/487623 to your computer and use it in GitHub Desktop.

Select an option

Save cowboy/487623 to your computer and use it in GitHub Desktop.
for eric
function filter( e ){
var term = $.trim( this.value.toLowerCase() );
if( !term ){
rows.show();
} else {
rows.hide();
self._trigger( "filter", e, $.map( cache, function(v,i){
if ( v.indexOf(term) !== -1 ) {
rows.eq(i).show();
return inputs.get(i);
}
return null;
});
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment