I need to perform a custom action when it turns invalid. Currently, I have this:
success: function(label) { label.html("good").parent('div').removeClass('bad').addClass('good'); }, Ideally, I would just do: failure: function(label) { // set as text for IE label.html("bad").parent('div').removeClass('good').addClass('bad'); } But that doesn't work. How can I perform this action when the script detects that something is amiss?