title: Javascript check multiple inputs for blank, return one value
body: <p>Ok guys, before I continue, I know what I want to do could be done with numerous variables etc. but I've gotta imagine that what I'm doing can be done much more simply. So what I have is a form that has 4 fields and I want to check if anyone of the four are blank. Then each one that is blank, I want to add a class and use the jquery UI effect 'shake' to notify. Then I want to get a true or false response, true being that all aren't blank and false being that any one of the 4 is blank. so what I have is.. HTML...</p>
  
  <pre><code>&lt;form name = "regin" id = "regin"&gt;
    &lt;div id = "form_hold"&gt;
    &lt;div&gt;&lt;label&gt;Username&lt;/label&gt;&lt;input type="text" id = "Rusername" name = "Rusername" /&gt;&lt;div class = 'verdiv' id = 'rvuname'&gt;&lt;/div&gt;&lt;/div&gt;
    &lt;div&gt;&lt;label&gt;Email&lt;/label&gt;&lt;input type="text" id = "Remail" name = "Remail" /&gt;&lt;div class = 'verdiv' id = 'rvemail'&gt;&lt;/div&gt;&lt;/div&gt;
    &lt;div&gt;&lt;label&gt;Password&lt;/label&gt;&lt;input type="password" id = "Rpassword" name = "Rpassword" /&gt;&lt;div class = 'verdiv' id = 'rvpass1'&gt;&lt;/div&gt;&lt;/div&gt;
    &lt;div&gt;&lt;label&gt;Confirm&lt;/label&gt;&lt;input type="password" id = "Rpassword2" name = "Rpassword2" /&gt;&lt;div class = 'verdiv' id = 'rvpass2'&gt;&lt;/div&gt;&lt;/div&gt;
    &lt;/div&gt;
    &lt;button type="button" class = "thoughtbot" id = "registerButton"&gt;Register&lt;/button&gt;
    &lt;/form&gt;
  </code></pre>
  
  <p>and the javascript/jquery...</p>
  
  <pre><code>if($username == ''){
      $('#Rusername').parent().find('.verdiv').addClass('error');
      $('#Rusername').parent().effect("shake", { times:3 }, 50);
  }
  if($email == ''){
      $('#Remail').parent().find('.verdiv').addClass('error');
      $('#Remail').parent().effect("shake", { times:3 }, 50);
  }   
  if($password == ''){
      $('#Rpassword').parent().find('.verdiv').addClass('error');
      $('#Rpassword').parent().effect("shake", { times:3 }, 50);
  }
  if($checkval == ''){
      $('#Rpassword2').parent().find('.verdiv').addClass('error');
      $('#Rpassword2').parent().effect("shake", { times:3 }, 50); 
  }
  </code></pre>
  
  <p>Now is there one top level function to 'test' each one of these statements to see if they're true?  Thanks.</p>