jQuery 1.0.2

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


};

// Clean up after IE to avoid memory leaks
if (jQuery.browser.msie) jQuery(window).unload(function() {
    var event = jQuery.event, global = event.global;
    for (var type in global) {
         var els = global[type], i = els.length;
        if (i>0) do if (type != 'unload') event.remove(els[i-1], type); while (--i);
    }
});
jQuery.fn.extend({

    // overwrite the old show method
    _show: jQuery.fn.show,

    show: function(speed,callback){
        return speed ? this.animate({
            height: "show", width: "show", opacity: "show"
        }, speed, callback) : this._show();
    },

    // Overwrite the old hide method
    _hide: jQuery.fn.hide,

    hide: function(speed,callback){
        return speed ? this.animate({
            height: "hide", width: "hide", opacity: "hide"
        }, speed, callback) : this._hide();
    },

    slideDown: function(speed,callback){
        return this.animate({height: "show"}, speed, callback);
    },

    slideUp: function(speed,callback){
        return this.animate({height: "hide"}, speed, callback);
    },

    slideToggle: function(speed,callback){
        return this.each(function(){
            var state = jQuery(this).is(":hidden") ? "show" : "hide";
            jQuery(this).animate({height: state}, speed, callback);
        });
    },

    fadeIn: function(speed,callback){
        return this.animate({opacity: "show"}, speed, callback);