Created
April 24, 2016 10:30
-
-
Save iamryanyu/74ec53a337099cb68fb8b0f2135edc6b 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
var $graphLink = $('.graph__link'), | |
$graphBarRed = $('.graph__bar--red'), | |
$graphBarGreen = $('.graph__bar--green'), | |
$graphBarYellow = $('.graph__bar--yellow'), | |
$graphStarRed = $('.graph__star--red'), | |
$graphStarGreen = $('.graph__star--green'), | |
$graphStarYellow = $('.graph__star--yellow'); | |
$graphLink.hover(function() { | |
TweenMax.to($graphBarRed, 1.2, { | |
scaleY: 1.5, | |
transformOrigin: '50% bottom', | |
ease: Elastic.easeOut.config(1, 0.2) | |
}); | |
TweenMax.to($graphBarGreen, 1.2, { | |
scaleY: 0.4, | |
transformOrigin: '50% bottom', | |
ease: Elastic.easeOut.config(1, 0.2) | |
}); | |
TweenMax.to($graphBarYellow, 1.2, { | |
scaleY: 1.3, | |
transformOrigin: '50% bottom', | |
ease: Elastic.easeOut.config(1, 0.2) | |
}); | |
TweenMax.to($graphStarRed, 1.2, { | |
y: -25, | |
ease: Elastic.easeOut.config(1, 0.2) | |
}); | |
TweenMax.to($graphStarGreen, 1.2, { | |
y: 45, | |
ease: Elastic.easeOut.config(1, 0.2) | |
}); | |
TweenMax.to($graphStarYellow, 1.2, { | |
y: -17, | |
ease: Elastic.easeOut.config(1, 0.2) | |
}); | |
}, function() { | |
TweenMax.to($graphBarRed, 1.2, { | |
scaleY: 1, | |
ease: Elastic.easeOut.config(1, 0.2) | |
}); | |
TweenMax.to($graphBarGreen, 1.2, { | |
scaleY: 1, | |
ease: Elastic.easeOut.config(1, 0.2) | |
}); | |
TweenMax.to($graphBarYellow, 1.2, { | |
scaleY: 1, | |
ease: Elastic.easeOut.config(1, 0.2) | |
}); | |
TweenMax.to($graphStarRed, 1.2, { | |
y: 0, | |
ease: Elastic.easeOut.config(1, 0.2) | |
}); | |
TweenMax.to($graphStarGreen, 1.2, { | |
y: 0, | |
ease: Elastic.easeOut.config(1, 0.2) | |
}); | |
TweenMax.to($graphStarYellow, 1.2, { | |
y: 0, | |
ease: Elastic.easeOut.config(1, 0.2) | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment