title: Remove Error class when user starts typing in input
body: <p>I'm using an ajax call to submit a <code>FORM</code>. I want to highlight all the inputs that fail validation and then remove the highlight as soon as they start entering into the input field. I am able to add the error class but I cannot get it to be removed. I have tried numerous things including calling events on keydown, keypress, keyup, change, focus, etc.. </p>
  
  <p>For everything I've tried, either nothing happens or the alert gets fired off only ONCE immediately after submitting. </p>
  
  <p>Here's what I have right now:</p>
  
  <pre><code>$(document).ready(function() {
  $('#config_form_submit').off().click(function(e) {
      e.preventDefault();
      $('#config_form').submit();
  });
  
  
  function removeErrorClass() {
      alert($(this).html());
  }
  
  // $("input .error").keyup(removeErrorClass());
  //$("input .error").change(removeErrorClass());
  //$("input .error").keydown(removeErrorClass());
  //$(".error").on(keypress, removeErrorClass());
  
  
  $('#config_form').off().submit(function(e) {
      e.preventDefault();
      $.ajax({
          type:"POST",
          url: $('#config_form').attr('action'),
          data: $(this).serialize(),
          datatype: 'json',
          success: function(data) {
              $("#config_results").text(data.message);
              if(data.errors.length &gt; 0)
                  for(index in data.errors) {
                      $("#id_"+data.errors[index]).addClass("error");
                      $("#id_"+data.errors[index]).bind("input", removeErrorClass());
                  }
          },
      });
  });
  }); //document.ready
  </code></pre>