Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MoveFrom... easing animations #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions css/animations.css
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,34 @@
-webkit-animation: moveToLeft .7s ease-in-out both;
animation: moveToLeft .7s ease-in-out both;
}
.pt-page-moveFromLeftEasing {
-webkit-animation: moveFromLeft .7s ease-in-out both;
animation: moveFromLeft .7s ease-in-out both;
}
.pt-page-moveToRightEasing {
-webkit-animation: moveToRight .7s ease-in-out both;
animation: moveToRight .7s ease-in-out both;
}
.pt-page-moveFromRightEasing {
-webkit-animation: moveFromRight .7s ease-in-out both;
animation: moveFromRight .7s ease-in-out both;
}
.pt-page-moveToTopEasing {
-webkit-animation: moveToTop .7s ease-in-out both;
animation: moveToTop .7s ease-in-out both;
}
.pt-page-moveFromTopEasing {
-webkit-animation: moveFromTop .7s ease-in-out both;
animation: moveFromTop .7s ease-in-out both;
}
.pt-page-moveToBottomEasing {
-webkit-animation: moveToBottom .7s ease-in-out both;
animation: moveToBottom .7s ease-in-out both;
}
.pt-page-moveFromBottomEasing {
-webkit-animation: moveFromBottom .7s ease-in-out both;
animation: moveFromBottom .7s ease-in-out both;
}

/********************************* keyframes **************************************/

Expand Down
4 changes: 4 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
<li data-animation="14"><a href="#">Different easing / from left</a></li>
<li data-animation="15"><a href="#">Different easing / from bottom</a></li>
<li data-animation="16"><a href="#">Different easing / from top</a></li>
<li data-animation="68"><a href="#">To left / different easing</a></li>
<li data-animation="69"><a href="#">To right / different easing</a></li>
<li data-animation="70"><a href="#">To top / different easing</a></li>
<li data-animation="71"><a href="#">To bottom / different easing</a></li>
</ul>
</li>
<li>
Expand Down
16 changes: 16 additions & 0 deletions js/pagetransitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,22 @@ var PageTransitions = (function() {
outClass = 'pt-page-rotateSlideOut';
inClass = 'pt-page-rotateSlideIn';
break;
case 68:
outClass = 'pt-page-moveToLeft';
inClass = 'pt-page-moveFromRightEasing';
break;
case 69:
outClass = 'pt-page-moveToRight';
inClass = 'pt-page-moveFromLeftEasing';
break;
case 70:
outClass = 'pt-page-moveToTop';
inClass = 'pt-page-moveFromBottomEasing';
break;
case 71:
outClass = 'pt-page-moveToBottom';
inClass = 'pt-page-moveFromTopEasing';
break;

}

Expand Down