How can I get jquery .val() AFTER keypress event?
- by werner5471
I got:
$(someTextInputField).keypress(function() {
alert($(this).val());
});
Now the alert always returns the value BEFORE the keypress (e.g. the field is empty, I type 'a' and the alert gives me ''. Then I type 'b' and the alert gives me 'a'...). But I want the value AFTER the keypress - how can I do that?
Background: I'd like to enable a…