title: check if all input field has value jQuery condition
body: <p>i have several input fields with a class name of <code>required</code>.</p>
  
  <p>i have a code below to check if all my <code>&lt;input&gt;</code> fields have a value, if not empty or null, it will show/unhide a specific <code>div</code>. </p>
  
  <p>but it doest seem to work on me. </p>
  
  <p>also, by default, <code>#print</code> is displayed as none via CSS.</p>
  
  <pre><code>&lt;!-- index.php --&gt;
  
  &lt;input type="text" id="getID" class="required form-control" placeholder="id"&gt;
  &lt;input type="text" id="getName" class="required form-control" placeholder="name"&gt;
  
  &lt;!-- script.js --&gt;
  
  $(document).ready(function() { 
    $('input.required').each(function() { 
      if($(this).val() != "") {
          $("#print").show();
      }
      else {
          $("#print").hide();
      }
    });
  });
  </code></pre>