Skip to content

Instantly share code, notes, and snippets.

@thisiskylierose
Created January 30, 2014 09:46
Show Gist options
  • Save thisiskylierose/bb0d2f63133c021dcfb4 to your computer and use it in GitHub Desktop.
Save thisiskylierose/bb0d2f63133c021dcfb4 to your computer and use it in GitHub Desktop.
// set thing
TweenMax.set('#SC1T4W', {clip: 'rect(0px, 0px, 40px, 0px)', alpha: 0});
//animate thing
TweenMax.to('#SC1T4W', 0.3, {clip: 'rect(0px, 774px, 40px, 0px)', delay: 0.1}); // expands to the right
TweenMax.to('#SC1T4W', 0.3, {clip: 'rect(0px 774px 40px 774px)', delay: 0.4}); // contracts to left
// reset thing
TweenMax.set('#SC1T4W', {clip: 'rect(0px, 0px, 40px, 0px)', alpha: 0});
// animate thing
TweenMax.to('#SC1T4W', 0.3, {clip: 'rect(0px, 774px, 40px, 0px)', delay: 0.1}); // expands to the right
TweenMax.to('#SC1T4W', 0.3, {clip: 'rect(0px 774px 40px 774px)', delay: 0.4}); // contracts to left
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment