loading jquery ui-tab at bottom of html and tab repainting issue
On a particular page, I am using jquery ui tab to tabify my web page. My JavaScripts are placed in external files and loaded at the end of my HTML. On document ready event, the very first thing I do is to call the tabify plugin.
The problem is that the browser has already painted the page at this point, then repaints it once it tabifies the page. So, I get a split-second flickering of the screen. How do I prevent this flickering? I do not want to load JavaScripts in as I am trying to optimize my site per Google PageSpeed/Yahoo YSlow recommendations.
<html>开发者_如何学JAVA;
<body>
....
<script src="tabify.js"></script>
</body>
</html>
tabify.js
$('document').ready(function(){
$("#tabs").tabs();
});
hide the content with css display:none;
then use $("#tabs").show().tabs();
精彩评论