Cloning a div only half-working.

Cloning a div only half-working.

Hi, I have stumbled into a problem when cloning a div.  What I want to achieve is a list of a cloned div that can output the id on a button click. Then the user can reset it where it is cloned again, but it is on the latter I have the problem.


The first part run fines, when you click first time it works fine but if you press 'empty again' the list is rebuilt but the is no output when you click on a item?

Can anyone help me, thanks in advance.