Created
October 10, 2013 13:53
-
-
Save madrobby/6918742 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// iOS 7-like panel animation using Zepto | |
// this is a bit simplified, but it's a good start | |
var PANEL_SPEED = 650, | |
PANEL_EASING = 'cubic-bezier(0.23,1,0.32,1)' | |
$('#panel_to_slide_out').animate({ | |
translateX: '-50%', opacity: 1 }, PANEL_SPEED, PANEL_EASING) | |
$('#panel_to_slide_in').animate({ | |
translateX: '0%', opacity: 1 }, PANEL_SPEED, PANEL_EASING) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is this compatible with jQuery's .animate out of the box or is some tweaking necessary?