Attach an event to new HTML
Hi
I have an list <li> of uploaded files. Next to each file is a remove button
In my js file I have code like the following
jQuery(document).ready(function(){
$("button[name=Remove]").click(function() {
....
}
}
Each button has the name tag set to 'Remove'
Now if the user uploads a new file via ajax, the <li> list adds a new rown with a remove button
But this button doesnt bind to the click event oulined above. How can I enforce this without a page refresh. A page refresh binds the click event to the new row
Please help