Prevent FOUC using jQuery UI Accordion and javascript loading in body

拈花ヽ惹草 提交于 2019-12-25 05:19:26

问题


My current problem is that my webpage suffers from FOUC using the jQuery UI Accordion plugin and javascript being loaded at the end of my html-body-tag. When I include the javascript in the head everything loads just fine. html5boilerplate recommends putting all the javascript at the end of the body-tag to avoid slow page loading.

I also tried to display: none the accordion and show() it on document ready after I initialized the accordion but that is not satisfying, too. Any ideas?


回答1:


I did have the problem. Reading that article -> http://www.learningjquery.com/2008/10/1-way-to-avoid-the-flash-of-unstyled-content helped a lot.



来源:https://stackoverflow.com/questions/11989171/prevent-fouc-using-jquery-ui-accordion-and-javascript-loading-in-body

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!