title: get files form input file before submit
body: <p>I'm trying to get the file to upload of an input file  and is undefined</p>
  
  <pre><code>$('#extra-submit').on('click',function(e){
      var file = $('#extra-file');
      console.log(file.files);
  });
  </code></pre>
  
  <p>ans this is the html ,the input file it's not inside a form </p>
  
  <pre><code>&lt;div&gt;
              &lt;div class="col-md-12"&gt; 
                  &lt;input type="file" name="extra-file" id="extra-file"&gt;
              &lt;/div&gt;
              &lt;div class="col-md-12 text-center"&gt; 
                  &lt;button type="button" id="extra-submit" class="btn btn-default"&gt;Afegir&lt;/button&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  </code></pre>