Query源码 — after方法

after方法定义在jQuery.prototype
after: function() {
	if ( this[0] && this[0].parentNode ) {
		return this.domManip(arguments, false, function( elem ) {
			this.parentNode.insertBefore( elem, this.nextSibling );
		});
	} else if ( arguments.length ) {
		var set = this.pushStack( this, "after", arguments );
		set.push.apply( set, jQuery(arguments[0]).toArray() );
		return set;
	}
}

你可能感兴趣的:(query)