Currently I have this, if the value is between 35 and 49 then show a message:
$(window).load(function() {
$("#amountInput").change(function(){
if(parseInt(this.value) > 34 && parseInt(this.value) < 50) {
$(".amountMessage").addClass("show");
} else {
$(".amountMessage").removeClass("show");
}
})
});
The only issue is the input value isn't checked until I have clicked off the input. I need the value to be checked as the input value is updated. I've tried keyup and keypress instead of change but it didn't seem to work, maybe I did it wrong (probably!). Any help here would be greatly appreciated!
Thank you!