jQuery bind method
- by rajeeesh
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