I found this solution for a case-insensitive jQuery :contains
selector on StackOverflow. It works great, however it comes at the cost of performance. Does anyone el
You could try to check the selector only once, after the user has stopped typing for a specified amount of time, not for every keystroke.
For example, a simple implementation:
Usage:
$("#textboxId").keyup(function () {
typewatch(function () {
// executed only 500 ms after the user stopped typing.
}, 500);
Implementation:
var typewatch = function(){
var timer = 0; // store the timer id
return function(callback, ms){
clearTimeout (timer); // if the function is called before the timeout
timer = setTimeout(callback, ms); // clear the timer and start it over
}
}();