jQuery 1.0.2

2019-06-03 18:50:05于海丽


        // Queueing
        o.oldComplete = o.complete;
        o.complete = function(){
            jQuery.dequeue(this, "fx");
            if ( o.oldComplete && o.oldComplete.constructor == Function )
                o.oldComplete.apply( this );
        };

        return o;
    },

    queue: {},

    dequeue: function(elem,type){
        type = type || "fx";

        if ( elem.queue && elem.queue[type] ) {
            // Remove self
            elem.queue[type].shift();

            // Get next function
            var f = elem.queue[type][0];

            if ( f ) f.apply( elem );
        }
    },

    /*
     * I originally wrote fx() as a clone of moo.fx and in the process
     * of making it small in size the code became illegible to sane
     * people. You've been warned.
     */

    fx: function( elem, options, prop ){

        var z = this;

        // The users options
        z.o = {
            duration: options.duration || 400,
            complete: options.complete,
            step: options.step
        };

        // The element