I have an element:
<input type="file" id="fileUpload" size="100" name="fileUpload"/>
A change event is bound to this element i.e. :
$('input[type=file]').change(function()
{
alert('changed');
});
I am cloning this element using:
var newElement = $('#fileUpload').clone();
and appending newElement to the form:
$('form').append(newElement);
Now what happens is that after appending the change event is not bound to the new element.
Any idea why this is and how to solve this?
jQuery clone