摘要:
1.jQuery = function( selector, context ) { return new jQuery.fn.init( selector, context, rootjQuery );}jQuery.fn.init.prototype = jQuery.fn;代码为什么这么写?首先, jQuery.fn=jQuery.prototype.调用$("#domId") 时, 其实是调用了new jQuery.prototype.init("#domId"), 而这里有一个new.javascript里面的new用来构造对象, $(&quo 阅读全文