Created
February 6, 2013 21:29
-
-
Save mspanish/4726021 to your computer and use it in GitHub Desktop.
A CodePen by Stacey Reiman.
This file contains 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
<div id="buttonbar"><img id="memoryToggle" onClick="memoryMode()" class="buttonBar" src="http://www.instaspanish.com/dev/memory.svg" height="75px" width="150px" /><img id="matchToggle" class="buttonBar" onClick="matchMode()" src="http://www.instaspanish.com/dev/match.svg" height="75px" width="150px" /></div> |
This file contains 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
memorytoggle = $('#memoryToggle') | |
matchtoggle = $('#matchToggle') | |
init(); | |
function init() { | |
TweenLite.to(memorytoggle, .1, {css:{skewY:"-180deg"}}); | |
} | |
function matchMode() { | |
TweenLite.to(matchtoggle, .2, {css:{autoAlpha:0}}); | |
TweenLite.to(matchtoggle, .5, {css:{skewY:"180deg"}}); | |
TweenLite.to(memorytoggle, .5, {css:{skewY:"-180deg", autoAlpha:1}}); | |
} | |
function memoryMode() { | |
TweenLite.to(memorytoggle, .2, {css:{autoAlpha:0}}); | |
TweenLite.to(memorytoggle, .5, {css:{skewY:"180deg"}}); | |
TweenLite.to(matchtoggle, .5, {css:{skewY:"-180deg", autoAlpha:1}}); | |
} |
This file contains 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
.buttonBar { | |
position:absolute; | |
left:80%; | |
top:10px; | |
height:auto; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment