Hiding everything until the page has finished loading

后端 未结 8 1479
滥情空心
滥情空心 2020-12-19 06:33

I am looking to have everything on my page hidden until the page has finished loading. I have seen many posts and tried different things. The most common solution which work

8条回答
  •  半阙折子戏
    2020-12-19 07:03

    Try this example. http://jsfiddle.net/iashu/AaDeF/

    container content....

    Jquery

    $(window).load(function() {
        //show();
    });
    
    
    function show() {
        $('#loading').hide();
        $('#container').fadeIn();
    };
    
    setTimeout(show, 3000);
    

提交回复
热议问题