jQuery 1.0.2

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

                fn.apply(this);
        });
    }

});

jQuery.extend({

    setAuto: function(e,p) {
        if ( e.notAuto ) return;

        if ( p == "height" && e.scrollHeight != parseInt(jQuery.curCSS(e,p)) ) return;
        if ( p == "width" && e.scrollWidth != parseInt(jQuery.curCSS(e,p)) ) return;

        // Remember the original height
        var a = e.style[p];

        // Figure out the size of the height right now
        var o = jQuery.curCSS(e,p,1);

        if ( p == "height" && e.scrollHeight != o ||
            p == "width" && e.scrollWidth != o ) return;

        // Set the height to auto
        e.style[p] = e.currentStyle ? "" : "auto";

        // See what the size of "auto" is
        var n = jQuery.curCSS(e,p,1);

        // Revert back to the original size
        if ( o != n && n != "auto" ) {
            e.style[p] = a;
            e.notAuto = true;
        }
    },

    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;