I really need your help. I am creating a page transition like this one: https://codyhouse.co/demo/animated-page-transition/index.html
But I am following this animation to my OWN design.
So far what here's what I have experimented: https://jsfiddle.net/f7xpe0fo/1/
And it doesn't follow my design yet. To see my actual JSFIDDLE check it here: https://jsfiddle.net/8y801eqh/11/
What my HTML contains is that I created two divs with ID's main-page and next-page. The first page is color red and the next page is color green. By default i hide the next-page div. Check out my HTML:
<div id="main-page">
<div>
<h1>Page Transition</h1>
<a href="#"> Click Here</a>
</div>
</div>
<div id="next-page">
<div>
<h1>This is the 2nd page</h1>
<a href="#"> Click Here</a>
</div>
</div>
Now for my CSS I fix their design to match up the whole page:
#main-page {
height: 50vh;
width: 100%;
position: fixed;
left: 0;
background-color: #e74c3c;
padding: 40px 0 40px 0;
}
h1{
font-family: Helvetica;
color: #fff;
font-weight: normal;
text-align: center;
}
#next-page{
height: 50vh;
width: 100%;
position: fixed;
left: 0;
background-color: #27ae60;
padding: 40px 0 40px 0;
display: none;
}
a{
font-family: Helvetica;
color: #fff;
border: 2px solid #fff;
padding: 10px 15px;
display: block;
text-align: center;
margin: 0 auto;
width: 20%;
text-decoration: none;
}
Based on my experiment here: https://jsfiddle.net/f7xpe0fo/1/
When I click on the word click here which is a link it must wrap the page to the next page.
I tried to transitioned the first phase of the animation however I don't know how to proceed to the next one. I understand that I need to use jQuery on this one but how can I? Can anyone help.
Here's the JSFIDDLE of my own: https://jsfiddle.net/8y801eqh/11/