0

看看这个页面如何加载它的内容一段时间,然后在延迟一段时间后触发 javascript?http://nomoresnoring.com/new/

我怎样才能让事情加载更顺畅?是否应该重新排序?

标题:

<head>
<script src="_/js/modernizr.custom.min.js"></script><!-- modernizr -->
<script src="//code.jquery.com/jquery-latest.min.js"></script><!-- jquery -->
<script src="_/js/jquery.leanModal.min.js"></script><!-- leanModal -->
<script src="_/js/jquery.sticky.min.js"></script><!-- sticky -->
<script src="_/js/jquery.customSelect.min.js"></script><!-- customSelect -->
<script src="_/js/jquery.scrollUp.min.js"></script><!-- scrollUp -->
<script src="_/js/happy.js"></script><!-- happy.js -->
<script src="_/js/happy.methods.js"></script><!-- happy.js -->
<!-- some other things -->
<script src="_/js/rhinoslider-1.05.min.js"></script><!-- rhinoslider -->
</head>

页脚:

<script type="text/javascript" src="_/js/functions.js"></script><!-- all custom functions -->
<script src="_/js/rhinoslider-1.05.min.js"></script><!-- for Rhinoslider -->
<script src="_/js/mousewheel.js"></script><!-- for Rhinoslider -->
<script src="_/js/easing.js"></script><!-- for Rhinoslider -->
</body>
</html>
4

1 回答 1

0

你可以做:

    //just before closing head tag
    <style>body{display:none}</style>
</head>

    //just before closing body tag
    window.onload = function(){
        $('body').fadeIn();
    };
</body>

您也可以使用预加载器动画。

于 2013-05-06T17:18:37.393 回答