Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to slide an entire page on load with jquery

Tags:

jquery

load

slide

I'd like to slide my entire page down when it's changed. I'm thinking the way to do this will be to create a vertical slide that plays when a link is clicked and again when the page loads? So far, I've only been able to create a slide that affects a particular DIV. I'd also like it to slide in vertically. Any ideas will be greatly appreciated!

like image 625
Bridget Kilgallon Avatar asked Nov 14 '22 07:11

Bridget Kilgallon


1 Answers

Just wrap all your content inside a div and slide that down.

CSS

#bodyContent {
   display:none;
   height: 100%;
}

HTML

<div id="bodyContent">
    //all your stuff goes in here
</div>

Javascript/JQuery

$(document).ready(function(){
   $('#bodyContent').slideDown();
});
like image 102
Aaron Snyder Avatar answered Dec 15 '22 07:12

Aaron Snyder