title: Better way to check if some inputs type file is empty in jquery?
body: <p>I know that is simple question but I need an advice from experienced people.</p>
  
  <p>I have 3 input type file like:</p>
  
  <pre><code>&lt;input type="file" name="1-files" /&gt;
  &lt;input type="file" name="2-files" /&gt;
  &lt;input type="file" name="3-files" /&gt;
  </code></pre>
  
  <p>I select all inputs (on my page I have also other inputs type file) which name ends with "-files" ( I wrote in Google Chrome console):</p>
  
  <pre><code>$("input[type='file'][name*='-files']").length
  </code></pre>
  
  <p>Ok. I select a file using <code>1-files</code> input. After that, I run the following code in Google Chrome console:</p>
  
  <pre><code>$("input[type='file'][name*='-files']:empty").length
  </code></pre>
  
  <p>I expect to be <code>2</code> but appears <code>3</code>.</p>
  
  <p>Can you tell me why ?</p>
  
  <p>I want to get all elements of input type file which values are empty. I used in short way the selector <code>:empty</code> but it seems not working properly.</p>
  
  <p>Of course, I could use </p>
  
  <pre><code>var empty_count = 0;
  $.each($("input[type='file'][name*='-files']"), function(k, v){
    if($(this).val() === '')
       empty_count++;
  });
  </code></pre>
  
  <p>But I want the shortest way to do this without <code>$.each</code>.</p>
  
  <p>Thank you</p>