I have an input type file connected to a label ( connected by for="uploadFileVideo"), when I click my label the function in script is supposed to be fired. The problem is that nothing happen when the selection is by class ( ".lbl") only when i use element ID, I want to convert the function in my script to javascript function ( function justClickedAlbl(){//Do Somthing} ), maybe it will solve my problem.
Is it possible to convert ?
//HTML
<label id="addVideo" for="uploadFileVideo" class="lbl colors" >Add Video</label>
<input id="uploadFileVideo" type='file' style="width: 300px; display: none" />
//Script
$(".lbl").click(function (evt) {
//Do something
});