title: verify form is filled out, HTML jQuery
body: <p>I know this is a simple question, but can you all help me with the following code?  I made this function to check that the required fields are filled out in a form.  If it finds one of the inputs is blank, then it should stop and return false.  If all the elements have content, it should return true.  The following function does not work because my <code>return false;</code> line is inside the jQuery <code>.each</code> function.  It is not returning the new function I defined.  How can I handle this?</p>
  
  <pre><code>function check_form(){
      $('form .required').each(function(){
          if ($(this).val() == ""){
              show_dialog('Please enter a value for ' + $(this).attr('name'));
              return false;
          }
      });
  
      return true;
  }
  </code></pre>
  
  <p>This function is returning true every time even if some required fields are blank.</p>
  
  <p>the problem is described in this fiddle: <a href="http://jsfiddle.net/f59t4/2/" rel="nofollow">http://jsfiddle.net/f59t4/2/</a></p>
  
  <p>It works now, thanks everyone!</p>