I am trying to trigger a click event on input type=”file” on the click of an another button.
Demo: http://jsfiddle.net/Y85g6/
It’s working fine in all browsers except on safari browsers in mac, Ipad & Iphone.
Is there any trick to accomplish this task?
Found an alternative.
Just position the input
type="file"over the custom button by absolute positioning it and usejQuery fadeTo('fast',0)to hide it.Now if we click over the custom button file browser window appears.
Its working in all desktop browsers but not in
iPhone&iPadas they don’t allow to upload any file.