I want to mandate that the value of a text box is lowercase using JavaScript. I've tried the code below, but the cursor jumps to the end of the input every time you press a key. How can I avoid this?
$("#beLowerCase").keyup(function(){
$(this).val( $(this).val().toLowerCase() );
});