jQuery log keypress

jQuery('.$id.').keypress(function (evt){
var keycode = evt.charCode || evt.keyCode;
console.log(keycode);
jQuery(this).val("Please use the calendar.");
});

Used in marmaladepantry.com.sg

Ref
1
2

Advertisements