jquery源码系列:append方法实现过程
no1: // Define a local copy of jQuery var jQuery = function( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' return new jQuery.fn. init ( selector, context, rootjQuery ); //调用第二步init方法 }, no2: jQuery.fn = jQuery.prototype = { constructor: jQuery, init : function( selector, context, rootjQuery ) { var match, elem, ret, doc; // Handle $(""), $(null), or $(undefined) if ( !selector ) { return this; } // Handle $(DOMElement) if ( selector.nodeType ) { this.context = this[0] = selector; this.length = 1; return this; } // The body element only exists once,