So I got this button:
<button class="upload-button" type="button">Upload File</button>
which I'm using to cover this default input/browse button:
<input type="file" id="fileinput" name="uploads[]" multiple="multiple">
however when I'm using this script:
$('.upload-button').on('click', function (){
$('#upload-input').click();
});
It does not seem to work, what i want to do is trigger the browse file after the fake button is clicked, i found another post on here where they said that this is because of the visibility of the file input is set to hidden, but when i tried to set it to default, it still did not work. What can the problem be here?
input? like$('#fileinput'').click();instead of$('#upload-input').click();