Text Filter on keypress
$("#txtFilter").keyup(function () {
var valThis = $(this).val().toLowerCase();
var valThis = $(this).val().toLowerCase();
$('.task-list>li').each(function(){
var text = $(this).text().toLowerCase();
(text.indexOf(valThis) >= 0) ? $(this).show() : $(this).hide();
});
(text.indexOf(valThis) >= 0) ? $(this).show() : $(this).hide();
});
});
No comments:
Post a Comment