I'm using an ajax function that builds fill the innerHTML
of a span and then build the jquery function. The first time I call the jquery function it works fine, yet if I called the ajax function again the jquery click function is being called twice, and if i call it once more the jquery get called 3 times and so on. This the jquery method I'm using:
$(".delete_mail").live('click', function() {
$(this).delete_mail();
});
I tried the .die
before filling the innerHTML
yet it did not help. I want to remove the jquery live
method before filling the innerHTML
so it wont be duplicated.
Please help.