jQuery bind method

Posted by rajeeesh on Stack Overflow See other posts from Stack Overflow or by rajeeesh
Published on 2012-04-05T11:14:19Z Indexed on 2012/04/05 11:29 UTC
Read the original article Hit count: 162

Filed under:
|

In one of my HTML page dynamically loading some file field while clicking a button like follows

$('#add').click(function(){


$('#files').append('<input type="file" class="myfile" name="myfile" />');


});

My question is how to "bind" newly added element to HTML page so that I can access like

$('.myfile').change(function(){
// Code Here
});

I am asking this because

$('.myfile').live('change',function(){
// Code here
});

not working in all browsers , expecially IE

Please help thanks

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about html