showing results for - "jquery change input value if greater than"
Emilia
17 Nov 2017
1jQuery("input[type='text'][name='quantity']").change(function() {
2    if (parseInt($(this).val(),10) > 40) {
3        alert("To order quantity greater than 40 please use the contact form.");
4        this.value == '';
5        /* or with jQuery: $(this).val(''); */
6        $(this).focus();
7        return false;
8    }
9});