I have some livequery handlers which update the page content. I'd like to display the content only after they have fired (to prevent users seeing for a while the unchanged version). The content is loaded using normal AJAX.
So far I tried the following:
- get the ajax via html
- make it invisible (visibility: hidden)
- window.setTimeout(showContent, 100) - sets visibility to visible
I supposed this would work as there's a single JS thread for a single tab - so the timer should fire after all other operations finished. And it works in FF & IE. However in Chrome, sometimes I'm still seeing the unchanged content for a while - as if JS was threaded or interrupted by the timeout?
Or maybe there's a better way to achieve what I'm trying to do? (Without the timeout).