Skip to content

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

New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

Image for: Conversation
Copy link
Member

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;
};

Sadly:

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

👍

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 closed this in 516a7a8 Nov 25, 2012
mescoda pushed a commit to mescoda/jquery that referenced this pull request Nov 4, 2014
lock bot locked as resolved and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
2 participants