jQuery总体架构

jQuery源码(jquery-1.7.1.js)的总体结构:
(function( window, undefined ) {
// 构造jQuery对象
   var jQuery = (function() {
       var jQuery = function( selector, context ) {
               return new jQuery.fn.init( selector, context, rootjQuery );
           }
       return jQuery;
   })();
// 工具方法 Utilities
// 回调函数列表 Callbacks Object
// 异步队列 Deferred Object
// 浏览器功能测试 Support
// 数据缓存 Data
// 队列 Queue
// 属性操作 Attributes
// 事件系统 Events
// 选择器 Sizzle
// DOM 遍历 Traversing
// DOM 操作 Manipulation
// 样式操作 CSS(计算样式、内联样式)
// 异步请求 Ajax
// 动画 Effects
// 坐标 Offset、尺寸 Dimensions
   window.jQuery = window.$ = jQuery;
})(window);

 

posted @ 2017-06-26 14:04  李小兜  阅读(114)  评论(0编辑  收藏  举报