首先要说明这是完全可行的,因为jquery中就是这么做的
var jQuery = function(selector,context){
return new jQuery.fn.init(selector,context,rootjQuery);
},
jQuery.fn = jQuery.prototype = {
constructor : jQuery,
init:function(selector,context,rootjQuery){...}
};
jQuery.fn.init.prototype = jQuery.fn;
但我总是理解不了。哪位大神能说一下自己的见解,总觉得这样不对或者别扭