views:

175

answers:

1

I am loading content into a page with ajax that will have live click events attached to them. It seems like the first time I load this content everything works as expected. If I load this again, the events fire twice (when put breakpoints in the code). What am I doing wrong? Is there a way I can clear the dom of these elements before they get loaded again?

+1  A: 

I guess you're calling .live() on the same elements again and again. use .die() on those elements before calling .live()

Kind Regards

--Andy

jAndy
Ok, I'll give it a try and see how it works.
Victor