title: jquery change background colour of empty required inputs
body: <p>I have a form that has both required and non required fields and I want to change the background colour of only the required inputs that are empty when the user submits the form.  </p>
  
  <p>The required fields have a class called 'required'</p>
  
  <pre><code>$('#audit_submit').click(function(){
     if($('.required').val() == '') 
      {
             $('.required').css('background-color' , '#FF0000');
          }
  });
  </code></pre>
  
  <p>All this does is if all of the fields are empty it changes all of them but if one isn't it doesn't change any of them.</p>