45
rated 0 times
[
48]
[
3]
/ answers: 1 / hits: 61098
/ 10 Years ago, tue, june 17, 2014, 12:00:00
I'd like the user to be blocked from typing more if the value is over 100. So far I have the following from reading different posts:
$('.equipCatValidation').keyup(function(e){
if ($(this).val() > 100) {
e.preventDefault();
}
});
To confirm I want the value not the string length, and it can't be above 100.
However this is not preventing further input in the field. What am I missing.
More From » jquery