$(document).ready(function(){
$("#page").click( function(){
$("#page").addClass('magictime perspectiveLeft');
$("#page").addClass('magictime perspectiveLeftRetourn');
What I am trying to do:
After clicking element("#page") this code should work:
$("#page").addClass('magictime perspectiveLeft');
, so the page element should go left (perspectiveLeft
).After completing this animation when I click the same element("#page") this code should work:
$("#page").addClass('magictime perspectiveLeftRetourn');
, so the page element should go back to its original position (perspectiveLeftRetourn
).
The animation should be just like a greeting card opening and closing.
How do I do that? Suggestions improving animation are appreciated.
I use https://github.com/miniMAC/magic/ for animation