diff options
author | Corey Frang <gnarf@gnarf.net> | 2012-11-08 00:02:14 -0600 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2012-11-25 15:23:02 -0500 |
commit | 516a7a8792200614d43caf1c9a004760fb5fec68 (patch) | |
tree | 5aad8597e85ccfc21fcb4f52a0f6a16befb3846b /src/effects.js | |
parent | 84629a9b876f6969777b43f3229b62b43bb624d2 (diff) | |
download | jquery-516a7a8792200614d43caf1c9a004760fb5fec68.tar.gz jquery-516a7a8792200614d43caf1c9a004760fb5fec68.zip |
Fix #12803. Add jQuery.fx.start as a hook point. Close gh-1024.
Diffstat (limited to 'src/effects.js')
-rw-r--r-- | src/effects.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/effects.js b/src/effects.js index bfe282aa5..d5ff7464c 100644 --- a/src/effects.js +++ b/src/effects.js @@ -640,13 +640,19 @@ jQuery.fx.tick = function() { }; jQuery.fx.timer = function( timer ) { - if ( timer() && jQuery.timers.push( timer ) && !timerId ) { - timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); + if ( timer() && jQuery.timers.push( timer ) ) { + jQuery.fx.start(); } }; jQuery.fx.interval = 13; +jQuery.fx.start = function() { + if ( !timerId ) { + timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); + } +}; + jQuery.fx.stop = function() { clearInterval( timerId ); timerId = null; |