Skip to content

Instantly share code, notes, and snippets.

@26medias
Created May 29, 2014 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 26medias/1c261537a636cd99ac3f to your computer and use it in GitHub Desktop.
Save 26medias/1c261537a636cd99ac3f to your computer and use it in GitHub Desktop.
// Resize the ad
var initAnim = function() {
// Init the styles
move(el.anim).scale(1.5).set('opacity', 0).duration('0ms').end();
// Wait one sec to do anything
setTimeout(function() {
// Alpha change for 1.8 sec
move(el.anim).set('opacity', 0.6).duration('1,8s').end();
// wait 1.8sec for the alpha to finish
setTimeout(function() {
// alpha=1 and scale=75% after 3.2sec
move(el.anim).scale(1).set('opacity', 1).duration('3,2s').end(function() {
// bugfix, remove the transition duration
move(el.anim).duration('0ms').end();
el.bg.style.display = 'none';
})
}, 1800);
}, 1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment