Am trying to trigger an upload box (browse button) using jQuery. The method I have tried now is:
$(\'#fileinput\').trigger(\'click\');
This is probably the best answer, keeping in mind the cross browser issues.
CSS:
#file { opacity: 0; width: 1px; height: 1px; }
JS:
$(".file-upload").on('click',function(){ $("[name='file']").click(); });
HTML:
Upload