c# - Using Jquery to capture click event of <asp:FileUpload> control -
my code:
<script> $('.upload').on("click", function () { alert("click event found using class identifier"); }); $('#fileupload1').on("click", function () { alert("click event found using id identifier"); }); </script> <asp:fileupload id="fileupload1" runat="server" cssclass="upload" />
i'm using latest version of jquery(1.9) why i'm using .on
instead of .live
but neither of alerts fire when click 'browse' button.
can @ ??
thanks.
you must use delegation .on() synthax, see equivalent live():
$(document).on("click",".upload",function(){...});
Comments
Post a Comment