I am trying to link an input to a button. In the sense that the button will trigger the input, and the input will remain hidden.
Below is a solution I found:
<a href="javascript:void(0)" id="files" href=""> 
 <button id="uploadDevice" class="button button-block button-positive">
            <i class="icon ion-android-mail"></i>   <text id="textBtn1">From Device </text>
</button></a>
Script:
<script>
  $("#files").click(function(){
        $(this).next().trigger('click');
    });
    </script>
Css
 <style>
  .uploadDevice{
     visibility : hidden;
  }
My issue is as follow: The button and the input MUST have different ID. The above solution works but both the button and the input id must be the same when I need them to differ.
 
    