I’m trying to get this jQuery live search to allow both lowercase and upper case but it does not work. it only works when there are not caps Any ideas on ow I can get it to work?
$('input#sort-plate').keyup(function () {
var value = $('input#sort-plate').val();
var match = $(".act-employee-directory .name").filter(function() {
// don't do this -> return $(this).text().match(new RegExp(value, "i"));
return $(this).text().toLowerCase().indexOf(value) !== -1;
});
if (match.length) {
$(".act-employee-directory").first().before(match.parent());
}
});
See complete code here