Last active
December 21, 2015 22:38
-
-
Save jtangelder/6376325 to your computer and use it in GitHub Desktop.
Revisions
-
jtangelder revised this gist
May 1, 2014 . 2 changed files with 24 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ (function(win, $) { var animating, raf, tick; raf = Modernizr.prefixed('requestAnimationFrame', win); if (!raf) { return; } animating = false; function tick() { if (animating) { raf(tick); $.fx.tick(); } }; $.fx.timer = function(timer) { if (timer() && $.timers.push(timer) && !animating) { animating = true; tick(); } }; $.fx.stop = function() { animating = false; }; })(window, jQuery); This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1 +0,0 @@ -
jtangelder revised this gist
Aug 29, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ !function(a,b){var c,d,e;d=Modernizr.prefixed("requestAnimationFrame",a),d&&(c=!1,e=function(){c&&(d(e),b.fx.tick())},b.fx.timer=function(a){a()&&b.timers.push(a)&&!c&&(c=!0,e())},b.fx.stop=function(){c=!1})}(window,jQuery); -
jtangelder revised this gist
Aug 29, 2013 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ !function(a,b){var c,d,e;return(d=Modernizr.prefixed("requestAnimationFrame",a))?(c=!1,e=function(){return c?(d(e),b.fx.tick()):void 0},b.fx.timer=function(a){return a()&&b.timers.push(a)&&!c?(c=!0,e()):void 0},b.fx.stop=function(){return c=!1}):void 0}(window,jQuery); -
jtangelder revised this gist
Aug 29, 2013 . 1 changed file with 0 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -3,13 +3,11 @@ # use Modernizr to get the (prefixed)DOM method raf = Modernizr.prefixed('requestAnimationFrame', win) if not raf return animating = false; tick = ()-> if animating raf(tick) -
jtangelder created this gist
Aug 29, 2013 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ # hack jQuery to use requestAnimationFrame for animations ((win, $)-> # use Modernizr to get the (prefixed)DOM method raf = Modernizr.prefixed('requestAnimationFrame', win) # just use jquery animate when no raf is available if not raf return animating = false; # request frame tick = ()-> if animating raf(tick) $.fx.tick() $.fx.timer = (timer)-> if timer() and $.timers.push(timer) and !animating animating = true tick() $.fx.stop = ()-> animating = false )(window, jQuery)