i\'m having trouble in chrome opening the popup for the file upload of a file input type.
As you can see here: http://jsfiddle.net/cavax/K99gg/3/, clicking on an ele
There is no way to trigger click event of input file type
, because of a security reason.
You may try a hack of this by setting your button/div
position to absolute
and top
to -100px
It means positioning it outside the viewport by setting above style make it works.
But for mouseenter
and mouseover
i don't think it's going to work!
Edit:
Moved input outside the viewport and target click event
Example on click
Side note: Right now click
occurs 2 times as you have written
$('#upload').trigger('click').click();
You just need
$('#upload').trigger('click'); // $('#upload').click()
unless you want it to fire more than single time.