Skip to content

Instantly share code, notes, and snippets.

@tonysaffo
Created May 16, 2018 17:08
Show Gist options
  • Save tonysaffo/34abd19fc834c26286d741096b855416 to your computer and use it in GitHub Desktop.
Save tonysaffo/34abd19fc834c26286d741096b855416 to your computer and use it in GitHub Desktop.
RealtimeSearching
$('.article-features__other .hidden-block .hidden-block__header input').keyup(function() {
var str = $(this).val();
$(this).parents('.hidden-block').find('ul li').each(function(){
if ($(this).text().search(new RegExp(str, "i")) < 0)
$(this).hide();
else
$(this).show();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment