I'm using the lovely pace.js as my page loader.
I created a #cover to hide all the content while the loading process complete.
#cover{
position:fixed;
top:0;
left:0;
background:#000;
z-index:99999;
width:100%;
height:100%
}
All I want, when the loading is complete is the cover to scroll up and the content to follow. So the content will slide up from the bottom of the page.
This Javascript makes the cover scrolling up the problem is the second part = the body to follow from the bottom of the page
$(window).load(function() {
Pace.on('done', function() {
$("#cover").slideUp(700);
});
});
This website is what I would like to achieve in terms of loading: http://www.ok-rm.co.uk
Any help? Thanks.
Fed.
I don't understand why you are using
position: fixed, just place#coverelement the first element of page and add body class wtihoverflow: hiddenproperty, and afterslideUp()is finished remove class. Hope this helps see: jsfiddleEdited:
Here is approach with
#coversliding up and content follows: jsfiddle