$("#beLowerCase").on('input', function(){
// store current positions in variables
var start = this.selectionStart,
end = this.selectionEnd;
this.value = this.value.toLowerCase();
// restore from variables...
this.setSelectionRange(start, end);
});
(fiddle)
This actually works with CSS as well:
#beLowerCase{
text-transform:lowercase;
}
And server can take care of the actual lower-casing...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With