Skip to content

Instantly share code, notes, and snippets.

@cdesch
Forked from samg/jquery-instantsearch.js
Created November 17, 2012 00:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdesch/4092235 to your computer and use it in GitHub Desktop.
Save cdesch/4092235 to your computer and use it in GitHub Desktop.
$().ready(function(){
// Instant Search
$('#q').keyup(function(){
$('.search_item').each(function(){
var re = new RegExp($('#q').val(), 'i')
if($(this).children('.search_text')[0].innerHTML.match(re)){
$(this).show();
}else{
$(this).hide();
};
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment