title: Revert the submit button back to it's initial state if input fields are empty or not correctly filled
body: <p>I am using the code below to replace the "send" text in a submit button of a contact form with loading_dots.gif image. </p>
  
  <pre><code>// Replace submit button text with loading gif 
  $('#submit').click(function() {
      $(this).html('&lt;img src="images/loading/loading_dots.gif" /&gt;');
  });
  </code></pre>
  
  <p>The form is validated before it's submitted. If one or more input field is not filled how can I revert the button back to it's initial state? </p>