Created
October 12, 2017 13:35
-
-
Save Bewitchedyegor/c6649d02696352407a8b9e38a8395a5b to your computer and use it in GitHub Desktop.
Change number inside input if maximum/minimum value is reached
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#pickAgeStart').on('keyup keydown click change', function(e) { | |
if ($(this).val() > 65 && e.keyCode !== 46 && e.keyCode !== 8) { //insert your value and < or > | |
e.preventDefault(); | |
$(this).val(65); //insert maximum/minimum value here | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment