Skip to content

"The uses of jQuery .queue and .dequeue()" cites outdated jQuery source code #289

Closed
@alimony

Description

@alimony

http://learn.jquery.com/effects/uses-of-queue-and-dequeue/

The second paragraph refers to the .delay implementation in the jQuery source code, but the code section is outdated, since the current implementation looks like this:

// Based off of the plugin by Clint Helfers, with permission.
// http://blindsignals.com/index.php/2009/07/jquery-delay/
delay: function( time, type ) {
    time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
    type = type || "fx";

    return this.queue( type, function( next, hooks ) {
        var timeout = setTimeout( next, time );
        hooks.stop = function() {
            clearTimeout( timeout );
        };
    });
}

It's probably not a good idea to have an example based on source code that's going to change over time, but could a temporary solution be to replace the code section with an updated version of the implementation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions