Here is sample code:
<input id="testing" />
$('#testing')
.keydown(function(e){
if(e.keyCode==13) {return false;}
})
.change(function(){
$('body').append('<br />changed');
});
How do you ppl doing it in IE7 / IE8 etc?
Thanks 😉
Problem is, that the fact that it’s changed has already occurred before your code is used.
So you can eat the change, but then on blur, it won’t react that it’s changed. Try this:
I think you’ll see what I mean. I think to do what you want, you might need to have your own variable, and track changes.