Skip to content

Instantly share code, notes, and snippets.

View iamryanyu's full-sized avatar

Ryan Yu iamryanyu

View GitHub Profile
<svg class="icon icon-small icon-yellow">
<title>Lorikeet</title>
<use xlink:href="styles/mysource_files/sprite.svg#lorikeet"></use>
</svg>
<a href="#" class="btn btn-small" aria-label="Lorikeet">
<svg class="icon icon-small icon-yellow" aria-hidden="true">
<use xlink:href="styles/mysource_files/sprite.svg#lorikeet"></use>
</svg>
</a>
<a href="#" class="btn btn-small">
<svg class="icon icon-small icon-yellow" aria-hidden="true">
<use xlink:href="styles/mysource_files/sprite.svg#lorikeet"></use>
</svg>
Lorikeet
</a>
var $graphLink = $('.graph__link'),
$graphBarRed = $('.graph__bar--red'),
$graphBarGreen = $('.graph__bar--green'),
$graphBarYellow = $('.graph__bar--yellow'),
$graphStarYellow = $('.graph__star--yellow'),
$graphStarRed = $('.graph__star--red'),
$graphStarGreen = $('.graph__star--green');
var graphTFOrigin = '50% bottom',
graphDuration = 1.2;
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, {
var $graphStarRed = $('.graph__star--red'),
$graphStarGreen = $('.graph__star--green'),
$graphStarYellow = $('.graph__star--yellow');
// hover over
TweenMax.to($graphStarRed, 1.2, {
y: -25,
ease: Elastic.easeOut.config(1, 0.2)
});
TweenMax.to($('.graph__bar--red'), 1.2, {
scaleY: 1,
ease: Elastic.easeOut.config(1, 0.2)
});
TweenMax.to($('.graph__bar--green'), 1.2, {
scaleY: 1,
ease: Elastic.easeOut.config(1, 0.2)
});
TweenMax.to($('.graph__bar--red'), 1.2, {
scaleY: 1,
ease: Elastic.easeOut.config(1, 0.2)
});
TweenMax.to($('.graph__bar--green'), 1.2, {
scaleY: 1,
ease: Elastic.easeOut.config(1, 0.2)
});
TweenMax.to($('.graph__bar--red'), 1.2, {
scaleY: 1.5,
transformOrigin: '50% bottom',
ease: Elastic.easeOut.config(1, 0.2)
});
TweenMax.to($('.graph__bar--green'), 1.2, {
scaleY: 0.4,
transformOrigin: '50% bottom',
ease: Elastic.easeOut.config(1, 0.2)
TweenMax.to($('.graph__bar--red'), 1.2, {
scaleY: 1.5,
transformOrigin: '50% bottom',
ease: Elastic.easeOut.config(1, 0.2)
});
TweenMax.to($('.graph__bar--green'), 1.2, {
scaleY: 0.4,
transformOrigin: '50% bottom',
ease: Elastic.easeOut.config(1, 0.2)