title: Count number of files in input box with jQuery?
body: <p>How can I count the number of files that are in the file upload input using jQuery?</p>
  
  <p>I have tried this but it always returns 1:</p>
  
  <pre><code>$("body").on("change", ".create-album .custom-file-input .createAlbumFileUpload", function(){   
  
      var numFiles = $("input:file", this).length;
      alert(numFiles);
  });
  </code></pre>
  
  <p>My HTML:</p>
  
  <pre><code>&lt;form enctype="multipart/form-data" class="createAlbumFileUpload"&gt;
      &lt;input type="file" name="uploadFile[]" multiple="multiple"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I found this <a href="http://jsfiddle.net/ShankarSangoli/yQFXq/" rel="noreferrer">jsFiddle</a> on another question asking the same thing, however I can't see why mine isn't working?</p>