title: check whether text field is empty or not jquery
body: <p>I have a div which contain lots of <code>input[type=text]</code> fields. I want to put a check that user must have fill all the fields otherwise show error message. For this i tried :</p>
  
  <pre><code>if ($('div').children("input[type=text]").attr("value") == '') 
   flag = false; 
  else 
   flag = true;
  </code></pre>
  
  <p>But this will not check all the text field, it only checks the first-child . How can i check all the text field ?</p>