Created
September 6, 2011 22:10
-
-
Save danro/1199146 to your computer and use it in GitHub Desktop.
Some animation code using ender / jeesh / morpheus
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
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