Every line of 'jquery animate after' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
1220 function animateBefore(element, className) { 1221 if(animateSetup(element, className)) { 1222 return function(cancelled) { 1223 cancelled && animateClose(element, className); 1224 }; 1225 } 1226 }
1228 function animateAfter(element, className, afterAnimationComplete) { 1229 if(element.data(NG_ANIMATE_CSS_DATA_KEY)) { 1230 return animateRun(element, className, afterAnimationComplete); 1231 } else { 1232 animateClose(element, className); 1233 afterAnimationComplete(); 1234 } 1235 }
140 function animate( callback ) { 141 $elem.animate( attr, duration, settings.easing, callback && function() { 142 callback.call(this, targ, settings); 143 }); 144 }
134 function animate( callback ){ 135 $elem.animate( attr, duration, settings.easing, callback && function(){ 136 callback.call(this, target); 137 }); 138 };
142 function animate( callback ){ 143 $elem.stop(true, false).animate( attr, duration, settings.easing, callback && function(){ 144 callback.call(this, target, settings); 145 }); 146 };
154 function animate(callback) { 155 $elem.animate(attr, duration, settings.easing, callback && function () { 156 callback.call(this, targ, settings); 157 }); 158 };
177 function animate( callback ){ 178 $elem.animate( attr, duration, settings.easing, callback && function(){ 179 callback.call(this, target, settings); 180 }); 181 };
151 function animate() { 152 $('.box').css({ 153 'opacity': box_values.opacity, 154 'transform': 'translate(' + box_values.x + 'px, ' + box_values.y + 'px)' 155 }); 156 window.requestAnimationFrame(animate); 157 }
69 function animate(element, from, to, duration, callback) { 70 71 //figure out how much to move per millisecond 72 var pixelsPerMS = Math.abs(from-to)/duration; 73 74 //keep track of the position 75 var pos = from; 76 77 //keep track of the time 78 var time = Date.now(); 79 80 //create the callback function 81 var func = function(){ 82 83 var lastTime, elapse, pixelsToMove; 84 85 lastTime = time; 86 time = Date.now(); 87 elapsed = time - lastTime; 88 pixelsToMove = Math.ceil(elapsed * pixelsPerMS); 89 90 pos = pos + pixelsToMove; 91 92 //In real life this should do more than move elements 93 //down. 94 element.style.top = pos + 'px'; 95 96 97 98 if( pos < to ){ 99 requestFrame(func); 100 } else { 101 callback(); 102 } 103 104 } 105 106 func(); 107 108 }
39 var endAnimation = window.setTimeout(function endAnimation(){ 40 // Animation Complete 41 42 // We don't want to the opportunity to stop the animation anymore 43 $elem.removeData( 'animating' ); 44 // Data attr for removing animations 45 // Or not... doesn't seem to work as well 46 $elem.data( 'animated', name ); 47 // Remove transition property 48 $elem.removeClass( name + '-transition' ); 49 50 // Hook for CSS optimisations 51 if( unload ){ 52 $elem.addClass( 'unload' ); 53 } 54 55 if( callback ){ 56 callback(); 57 } 58 }, duration + start );