Skip to content

Instantly share code, notes, and snippets.

@madrobby
Created October 10, 2013 13:53
Show Gist options
  • Save madrobby/6918742 to your computer and use it in GitHub Desktop.
Save madrobby/6918742 to your computer and use it in GitHub Desktop.
// 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)
@hessius
Copy link

hessius commented Oct 11, 2013

Is this compatible with jQuery's .animate out of the box or is some tweaking necessary?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment