I have a list on a page and a search bar that searches and filters the list as the user types. At the moment the input has to be all lowercase (which I've added myself). How can I remove all case sensitivity from the search string? For example if I search for teST the result for Test would still appear.
var list = $("table.ms-listviewtable");
var listItems = $("table.ms-listviewtable tr:not(.ms-viewheadertr)"); 
var input = $("input#filterInput");
input.keyup(function() {
  listItems.each(function() {
    var text = $(this).text();
    var text = $(this).text().toLowerCase();
    if (text.indexOf(input.val()) != -1) {
      $(this).show();
    } else {
      $(this).hide();
    }
  });
});
 
     
     
    