Skip to content

Instantly share code, notes, and snippets.

@samg
Created June 17, 2009 04:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save samg/131085 to your computer and use it in GitHub Desktop.
Save samg/131085 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