How would I run a check after a keypress function to see if an inputs value was empty so I can do another action.
For example.
$("input[name=amount]").keypress(function() {
$("table[name=apply]").show();
});
I want to hide the table if the user deletes all the keystrokes.
You will probably want to use either the
keyuporchangeevent so the value of the text-box has changed before the event handler runs. Thekeypressevent fires before the value of the input has changed, so for instance if the input is blank and a key is entered, the value in the event handler would still read as blank.Here is a demo: http://jsfiddle.net/jasper/C5KPq/