javascript - Jquery trigger file input -
I'm trying to trigger an upload box (browse button) using jQuery.
The method I have tried now is:
$ ('# fileinput'). Triggers ('Clicks'); But it does not seem to work. Please help. Thank you.
This is due to a security restriction.
I found that the security restriction occurs only when & lt; Input type = "file" /> is set to display: any or visbilty: hidden .
So I gave it to position: absolute and top: -100px; and trying to determine the position outside the viewport by working with Woollia.
See
This is called a hack.
Hope that works for you.
Comments
Post a Comment