title: jquery show processing image on submit button click but hide if css error class exists in the form
body: <p>I have the following jQuery code:</p>
  
  <pre><code>$("#signUpFormSubmitButton").click(function(){
  $('#processing').show();
  });
  </code></pre>
  
  <p>This works fine.  When the submit button is clicked on the form, I show a processing spinning graphic.</p>
  
  <p>I don't want to show the processing spinning graphic however, if there are errors on the form (form is not yet submitted).  I validate my form with jQuery as well and I add a "error" css class to the form input fields if there is an error.</p>
  
  <p>I want to use the css error class as the flag for this.</p>
  
  <p>I tried:</p>
  
  <pre><code>if (!$("#myForm input").hasClass("error") ) {
      $('#processing').show();
  }
  </code></pre>
  
  <p>But did not work.  Any help greatly appreciated.</p>