This is the code I got on stackoverflow also
but I want to enhance it to make not case sensitive
or should I change the \\b
because I think it's a match symbol.
What should I do?
function filter() {
var regex = new RegExp('\\b' + this.value);
var $els = $lbs.filter(function () {
return regex.test($(this).text());
});
$lbs.not($els).hide().prev().hide();
$els.show().prev().show();
};
input.keyup(filter).change(filter);