Prevent FOUC using jQuery UI Accordion and javascr

2019-09-09 19:35发布

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条回答
唯我独甜
2楼-- · 2019-09-09 20:02

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.

查看更多
登录 后发表回答