Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

[1.9] Adding jQuery.fx.start as a hook point - Fixes #12803 #1024

wants to merge 1 commit into


None yet
2 participants

gnarf commented Nov 8, 2012

The idea is to make "replacing" this as simple has having to implement the following logic:

var timerId;

jQuery.fx.start = function() {
    // could actually be called multiple times, so track your own state
    if ( !timerId ) {
        timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );

jQuery.fx.stop = function() {
    clearInterval( timerId );
    timerId = null;


Sizes - compared to master @ 877306738f931a711c41d907e69fc8930f985830
    263723       (+66)  dist/jquery.js                                         
     91771       (+35)  dist/jquery.min.js                                     
     32682       (+12)  dist/jquery.min.js.gz   

gibson042 commented Nov 8, 2012


Also, this might benefit from replacing all those jQuery.fx.propertyN = valueN; with jQuery.fx = { propertyN: valueN, ... }; (unless you think jQuery.fx needs to be Tween.prototype.init, in which case jQuery.extend( jQuery.fx, { propertyN: valueN, ... }); is still an option).

@gnarf gnarf closed this in 516a7a8 Nov 25, 2012

@mescoda mescoda pushed a commit to mescoda/jquery that referenced this pull request Nov 4, 2014

@gnarf @dmethvin gnarf + dmethvin Fix #12803. Add jQuery.fx.start as a hook point. Close gh-1024. 3a84256
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment