I want to perform a validation only when the input field is of number
type and corresponding attribute validate
has value checkit
. I am not sure what should I pass in place of astrix to bind this to keypress event $('*** input[type=number]').bind
mentioned in the code below. I am stuck here, any help in this regard is appreciated.
<input type="number" validate="checkit">
$('input[type=number]').bind('keypress', function(e) {
//do things here
});