jquery源码分析(2) JQuery的基本变量和函数3
来源:互联网 发布:金山数据恢复 账号 编辑:程序博客网 时间:2024/05/23 12:05
本文将分析(21 , 94) 定义了一些变量和函数 jquery = function(){};
分析的具体部分的源码(67-94) 【因为包含注释可能行号有所误差 (>^ω^<)
// Used for matching numberscore_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,// Used for splitting on whitespacecore_rnotwhite = /\S+/g,// A simple way to check for HTML strings// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)// Strict HTML recognition (#11290: must start with <)rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,// Match a standalone tagrsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,// Matches dashed string for camelizingrmsPrefix = /^-ms-/,rdashAlpha = /-([\da-z])/gi,// Used by jQuery.camelCase as callback to replace()fcamelCase = function( all, letter ) {return letter.toUpperCase();},// The ready event handler and self cleanup methodcompleted = function() {document.removeEventListener( "DOMContentLoaded", completed, false );window.removeEventListener( "load", completed, false );jQuery.ready();};
// Used for matching numbers
core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, //匹配一些数字
// Used for splitting on whitespace
core_rnotwhite = /\S+/g, //匹配空格
// A simple way to check for HTML strings
// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
// Strict HTML recognition (#11290: must start with <)
rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, //匹配标签或id防止XSS
// Match a standalone tag
rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, //匹配成对出现的标签
// Matches dashed string for camelizing
rmsPrefix = /^-ms-/, //匹配微软
rdashAlpha = /-([\da-z])/gi, //匹配驼峰写法 正常情况下 如-webkit-marign-left对应webkitMarginLeft但微软会转成MsMarignLeft即第一个字符大写
// Used by jQuery.camelCase as callback to replace()
fcamelCase = function( all, letter ) {
return letter.toUpperCase();
}, //转驼峰的回调函数
// The ready event handler and self cleanup method
completed = function() {
document.removeEventListener( "DOMContentLoaded", completed, false );
window.removeEventListener( "load", completed, false );
jQuery.ready();
}; //dom加载成功触发这个函数
第一部分分析(21 , 94) 定义了一些变量和函数 jquery = function(){}; 完结!
0 0
- jquery源码分析(2) JQuery的基本变量和函数3
- jquery源码分析(2) JQuery的基本变量和函数2
- jquery源码分析(2) JQuery的基本变量和函数1
- jquery源码分析(2) jQuery对象的一些方法和属性 3
- jQuery源码之init函数的分析
- jquery源码分析(2) jQuery对象的一些方法和属性 2
- jquery源码分析(2) jQuery对象的一些方法和属性 1
- jQuery 源码剖析-3 init 函数分析
- jQuery源码分析之jQuery.makeArray函数
- jQuery源码分析-each函数
- jQuery源码分析-extend函数
- jquery的基本知识点(函数和操作)
- jquery源码分析2
- jquery源码分析2
- [ jQuery ] jQuery 源码分析!
- jQuery源码分析(版本1.6.1)___构造jQuery对象-源码结构和核心函数
- jQuery源码分析-构造jQuery对象-源码结构和核心函数
- jQuery源码分析-03构造jQuery对象-源码结构和核心函数
- 随笔
- C的链表的概念应用
- 编程之美一 旋转的二进制(待确认)
- IE8兼容<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
- 我的选择?
- jquery源码分析(2) JQuery的基本变量和函数3
- 杭电2084数塔
- 实现多个具有相同方法的接口和父类与实现接口有相同方法
- 头指针,头结点,首元结点的区别,头结点的优点
- C++ 二叉搜索树头文件
- Apache许可证
- ExtJS 4.0 的改变--较为完整的介绍
- select函数使用注意
- 杭电acm 2015