Skip to content

Instantly share code, notes, and snippets.

@danro
Created September 6, 2011 22:10
Show Gist options
  • Save danro/1199146 to your computer and use it in GitHub Desktop.
Save danro/1199146 to your computer and use it in GitHub Desktop.
Some animation code using ender / jeesh / morpheus
function mouseOver (e) {
var bg = $(this).find("h2 .background");
var tween = bg.data("tween");
if (tween) tween.stop();
tween = morpheus(bg, { left: 0, duration: 200, easing: easings.easeOutStrong });
bg.data("tween", tween);
}
function mouseOut (e) {
var bg = $(this).find("h2 .background");
var tween = bg.data("tween");
if (tween) tween.stop();
tween = morpheus(bg, { left: -300, duration: 200, easing: easings.easeOut });
bg.data("tween", tween);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment