Open hidnasio opened 11 years ago
Something like this? (use the customization option to test the javascript)
$('.content ul').parent().prepend($("", { id: 'search' })); $('#search').keydown(function(){ var term = $.trim($(this).val()); if(term.length > 0) { term = new RegExp(term, 'i'); $('.content li').show().each(function(i, n) { if(!term.test(n.textContent)) { $(n).hide(); } }); } else { $('.content li').show(); } });
As a reader,
I want to be able to start writing in a text-box and the list of resources gets updated to only display the items with the text I'm writing.