jQuery 1.0.4 - New Wave Javascript(js源文件)

2019-06-03 09:49:42刘景俊

                    e.custom( e.cur(), prop[p] );
                else
                    e[ prop[p] ]( prop );
            }

        });
    },
    queue: function(type,fn){
        if ( !fn ) {
            fn = type;
            type = "fx";
        }

        return this.each(function(){
            if ( !this.queue )
                this.queue = {};

            if ( !this.queue[type] )
                this.queue[type] = [];

            this.queue[type].push( fn );

            if ( this.queue[type].length == 1 )
                fn.apply(this);
        });
    }

});

jQuery.extend({

    speed: function(s,o) {
        o = o || {};

        if ( o.constructor == Function )
            o = { complete: o };

        var ss = { slow: 600, fast: 200 };
        o.duration = (s && s.constructor == Number ? s : ss[s]) || 400;

        // Queueing
        o.oldComplete = o.complete;
        o.complete = function(){
            jQuery.dequeue(this, "fx");