Created
November 25, 2013 10:51
-
-
Save NOEinteractive/7639594 to your computer and use it in GitHub Desktop.
Remplacer rapidement $.animate par Tweenlite sur des animations existantes
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
//you need to load | |
//http://cdnjs.cloudflare.com/ajax/libs/gsap/latest/TweenLite.min.js | |
//http://cdnjs.cloudflare.com/ajax/libs/gsap/latest/plugins/CSSPlugin.min.js | |
if(window.TweenLite) { // smoother animation with TweenLite | |
$.fn.animate = function(params, duration, onComplete) { | |
if(onComplete) params.onComplete = onComplete; | |
TweenLite.to(this, duration/1000, params); | |
}; | |
} | |
//@todo : $.stop() avec killAll je pense |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment