title: calling click event of input doesn't work in Safari
body: <p>I have a input, type of file, with <code>display:none</code> and there is a button.
  after clicking the button, the input's event should be fired. In IE, Chrome and Firefox it works but not in Safari!</p>
  
  <pre><code>var elem=$('&lt;input id="ajxAttachFiles" name="fileUpload" type="file" style="display: none;"/&gt;');
      if($("#ajxAttachFiles").length==0){
          elem.prependTo(".ChProgress");
      }
  $("#ajxAttachFiles").click();
  </code></pre>
  
  <p>there is no error in console. I tried <a href="https://stackoverflow.com/questions/20928915/jquery-triggerclick-not-working">this</a> but nothing.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(document).ready(function(){
          $("#btn").on('click',function(){
            $("#ajxAttachFiles")[0].click();
          });
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;input id="ajxAttachFiles" type="file" style="display:none;"&gt;
  &lt;button id="btn" type="button"&gt;Click me!&lt;/button&gt;
  
  
     </code></pre>
  </div>
  </div>
  </p>