Having trouble figuring out how to rebind after Ajax call
Hi,
I read the stick note and realized why my events stop working after an Ajax .load call. I read the articles on rebinding, but I am having trouble getting mine to work properly.
In my case I have a set of links. The links sit inside a TABLE, which in turn is inside a DIV tag. When my link is clicked, my event rerenders the TABLE. I am trying to figure out how to re-bind the links to use my original click event.
Here is what I have, and I've tried a few variations, but I can't get this to work properly.
<code>
$('a.deleteZone').click( function(e) {
e.preventDefault();
$('div#zones').load(this.href, {
zone :this.id }, function()
{
$('a.deleteZone').each(function()
{
this.click(e);
}
);});});
</code>
I've been trying to find an example that shows how to do this with Ajax load events, but I haven't been able to find one. The main ones I've found use the list type examples.
Any help is greatly appreciated.
Regards,
Steve