views:

245

answers:

1

I have a page which reloads a DIV with AJAX every 5 seconds. I also have an AJAX sorting script (you can see it here). The sorting script works great when I visit the page for first time, but when the page is refreshed it doesn't work.

Am I doing something wrong? I have the sorting script in the HEAD tag, and the refresh on the bottom because I want to use some PHP variables there.

+1  A: 

If your refresh code repopulates the <div>, it's probably destroying the event handler associations that your table sorter established. Perhaps you need to re-run the table sorter initialization after each refresh.

Pointy