I would like check if caps lock is on, but with my code i can check only the uppercases and not the caps lock.
jQuery('#password').keypress(function(e) {
var s = String.fromCharCode( e.which );
if ( s.toUpperCase() === s && s.toLowerCase() !== s && !e.shiftKey ) {
jQuery('#caps').show();
}
else {
jQuery('#caps').hide();
}
});
this is my JS code.