jQuery 1.0.2

2020-05-23 06:10:44易采站长站整理

    },
    add: function(t) {
        return this.pushStack( jQuery.merge( this, t.constructor == String ?
            jQuery.find(t) : t.constructor == Array ? t : [t] ), arguments );
    },
    is: function(expr) {
        return expr ? jQuery.filter(expr,this).r.length > 0 : false;
    },
    domManip: function(args, table, dir, fn){
        var clone = this.size() > 1;
        var a = jQuery.clean(args);
        return this.each(function(){
            var obj = this;
            if ( table && this.nodeName.toUpperCase() == “TABLE” && a[0].nodeName.toUpperCase() != “THEAD” ) {
                var tbody = this.getElementsByTagName(“tbody”);
                if ( !tbody.length ) {
                    obj = document.createElement(“tbody”);
                    this.appendChild( obj );
                } else
                    obj = tbody[0];
            }
            for ( var i = ( dir < 0 ? a.length – 1 : 0 );
                i != ( dir < 0 ? dir : a.length ); i += dir ) {
                    fn.apply( obj, [ clone ? a[i].cloneNode(true) : a[i] ] );