How to eliminate post-render “flicker”?

后端 未结 6 1363

I\'ve tried my best to be a purist with my usage of Javascript/Ajax techniques, ensuring that all Ajax-y behavior is an enhancement of base functionality, while the site is also

6条回答
  •  北恋
    北恋 (楼主)
    2021-01-31 11:36

    A simple thing to try: add right before closing the body tag.

    This will force all binds to the 'ready' event to fire. And if you make them fire in the end of the document, the DOM is loaded and ready to go, even if the "native" onDomContentLoaded event is not yet fired.

    This usually works for me when I want to remove flickering, especially in IE/win, since IE has it's own domready emulator in jQuery's 'ready' event.

提交回复
热议问题