Skip to content

Instantly share code, notes, and snippets.

@polarblau
Created September 28, 2011 09:14
Show Gist options
  • Save polarblau/1247442 to your computer and use it in GitHub Desktop.
Save polarblau/1247442 to your computer and use it in GitHub Desktop.
jQuery easing extension for 80/20 animations
jQuery.easing['jswing'] = jQuery.easing['swing'];
jQuery.extend(jQuery.easing, {
eightyTwentyLinear: function(x, t, b, c, d) {
return ((b + c) - (b + c) * 0.8) * (t /= d) + (b + c) * 0.8;
},
eightyTwentyQuartOut: function(x, t, b, c, d) {
return -((b + c) - (b + c) * 0.8) * (t /= d) * (t - 2) + (b + c) * 0.8;
}
});
@polarblau
Copy link
Author

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