jQuery
文章平均质量分 75
haoguanjun
这个作者很懒,什么都没留下…
展开
-
jQuery 源码分析 -1 $是什么?
本源码使用当前的 jQuery 1.3.2 版本,下载时间 2009-4-25,下载网站:jquery.com。 一个函数 1 /*!2 * jQuery JavaScript Library v1.3.23 * http://jquery.com/4 *5 * Copyright (c) 2009 John Resig6 * Dual license原创 2010-04-22 21:17:00 · 539 阅读 · 0 评论 -
jQuery 源码剖析-3 init 函数分析
init 剖析 首先,看一下在 jQuery 中可以使用的四类构建对象的方式:l $( expression, [ context ] ),串的内容是一个 CSS 选择器,例如:$(“#msg”) 中的 msg 就是一个元素的 IDl $( html ),一个 HTML 串,返回一个 DOMElement 元素对象l $(函数),原创 2010-04-22 21:25:00 · 434 阅读 · 0 评论 -
jQuery 源码剖析-4 init 函数分析
47 // Handle HTML strings48 if ( typeof selector === "string" ) {49 // Are we dealing with HTML string or an ID?50 var match = quickExpr.exec( selector );5152 // Verify a match原创 2010-04-22 21:27:00 · 546 阅读 · 0 评论 -
jQuery 源码剖析-5 size,get 函数说明
96 // Start with an empty selector97 selector: "",9899 // The current version of jQuery being used100 jquery: "1.3.2",101102 // The number of elements contained in the matched ele原创 2010-04-22 21:28:00 · 448 阅读 · 0 评论 -
jQuery 源码剖析-6 setArray each index 函数说明
119 // Take an array of elements and push it onto the stack120 // (returning the new matched element set)121 pushStack: function( elems, name, selector ) {122 // Build a new jQuery matched el原创 2010-04-22 21:31:00 · 1241 阅读 · 0 评论 -
jQuery 源码剖析-2 几个正则表达式
简单的正则表达式 // Is it a simple selectorisSimple = /^.[^:#/[/.,]*$/; / / 表示这是正则表达式^ 表示开始部分$ 表示结束部分 . 匹配除了 /n 之外的任何字符[^character_group] 表示不在字符集合中[^:#/[/.] 表示除了 :, #, [, . 之外的任何字符原创 2010-04-22 21:22:00 · 473 阅读 · 0 评论 -
jQuery 中使用 JSON
JSON 格式json 是 Ajax 中使用频率最高的数据格式,在浏览器和服务器中之间的通讯可离不开它。JSON 的格式说明可以在可以这里看到,非常详细,还是中文的。 JSON 格式说明需要特别注意的是,在 JSON 中的属性名是需要使用引号引起来的。jQuery 是现在使用广泛的脚本库,那么,在 jQuery 中如何使用 JSON 呢?解析 JSON原创 2011-12-01 19:08:42 · 1134 阅读 · 2 评论