I noticed that sometimes when I navigate via AJAX to another page in a long thread, the embedded javascript does not execute.
For example, as a test I had embedded javascript to simply alert a message on a post for each page in a thread. The first alert popped up but going to page two (via AJAX) caused no alert. Manually forcing the reload to page 2 by changing the URL caused the page two message to appear but navigating back to page 1 (via AJAX) did not cause the page 1 message to appear.
I know you are using the
from the AJAX request and injecting it into the page, I suspect the browser is not aware that it has to execute anything on this type of navigation?