JQuery总的来讲是一个包含若干属性的对象,通过extend进行扩展
var jQuery = (function() {
// Define a local copy of jQuery
var jQuery = function(selector, context) {
return new jQuery.fn.init(selector, context, rootjQuery);//init方法是具有参数的
},
// Map over jQuery in case of overwrite
_jQuery = window.jQuery,
// Map over the $ in case of overwrite
_$ = window.$,
// A central reference to the root jQuery(document)
rootjQuery,
// A simple way to check for HTML strings or ID ......
阅读全文