/*
* 这个文件支持VS的智能感知。
* 为了支持智能感知,些js文件使用了非规范的javascript语法,所以请只在开发环境中使用。
* 在发布程序时,请使用jquery-1.3.2.min.js
*
* Comment version: 1.3.2b
*/
/*
* jQuery JavaScript 库 v1.3.2
* http://jquery.com/
*
* 2009 John Resig 版权所有
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
* Revision: 6246
*/
(function(){
var
// Will speed up references to window, and allows munging its name.
window = this,
// Will speed up references to undefined, and allows munging its name.
undefined,
// Map over jQuery in case of overwrite
_jQuery = window.jQuery,
// Map over the $ in case of overwrite
_$ = window.$,
jQuery = window.jQuery = window.$ = function(selector, context) {
/// <summary>
/// 1: $(expression, context) - 这个函数接收一个包含 CSS 选择器的字符串,然后用这个字符串去匹配一组元素。
/// 2: $(html) - 根据提供的原始 HTML 标记字符串,动态创建由 jQuery 对象包装的 DOM 元素。
/// 3: $(elements) - 将一个或多个DOM元素转化为jQuery对象。
/// 4: $(callback) - $(document).ready()的简写。
/// </summary>
/// <param name="selector" type="String">
/// 1: expression - 用来查找的表达式。
/// 2: html -用于动态创建DOM元素的HTML标记字符串
/// 3: elements - 用于封装成jQuery对象的DOM元素
/// 4: callback - 当DOM加载完成后,执行其中的函数。
/// </param>
/// <param name="context" type="jQuery">
/// 1: context - (可选) 作为待查找的 DOM 元素集、文档或 jQuery 对象。
/// </param>
/// <field name="selector" Type="Object">
/// The DOM node context originally passed to jQuery() (if none was passed then context will be equal to the document).
/// </field>
/// <field name="context" Type="String">
/// A selector representing selector originally passed to jQuery().
/// </field>
/// <returns type="jQuery" />
// The jQuery object is actually just the init constructor 'enhanced'
return new jQuery.fn.init( selector, context );
},
// A simple way to check for HTML strings or ID strings
// (both of which we optimize for)
quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,
// Is it a simple selector
isSimple = /^.[^:#\[\.,]*$/;
jQuery.fn = jQuery.prototype = {
init: function( selector, context ) {
/// <summary>
/// 1: $(expression, context) - 这个函数接收一个包含 CSS 选择器的字符串,然后用这个字符串去匹配一组元素。
/// 2: $(html) - 根据提供的原始 HTML 标记字符串,动态创建由 jQuery 对象包装的 DOM 元素。
/// 3: $(elements) - 将一个或多个DOM元素转化为jQuery对象。
/// 4: $(callback) - $(document).ready()的简写。
/// </summary>
/// <param name="selector" type="String">
/// 1: expression - 用来查找的表达式。
/// 2: html -用于动态创建DOM元素的HTML标记字符串
/// 3: elements - 用于封装成jQuery对象的DOM元素
/// 4: callback - 当DOM加载完成后,执行其中的函数。
/// </param>
/// <param name="context" type="jQuery">
/// 1: context - (可选) 作为待查找的 DOM 元素集、文档或 jQuery 对象。
/// </param>
/// <returns type="jQuery" />
// Make sure that a selection was provided
selector = selector || document;
// Handle $(DOMElement)
if ( selector.nodeType ) {
this[0] = selector;
this.length = 1;
this.context = selector;
return this;
}
// Handle HTML strings
if (typeof selector === "string") {
// Are we dealing with HTML string or an ID?
var match = quickExpr.exec(selector);
// Verify a match, and that no context was specified for #id
if (match && (match[1] || !context)) {
// HANDLE: $(html) -> $(array)
if (match[1])
selector = jQuery.clean([match[1]], context);
// HANDLE: $("#id")
else {
var elem = document.getElementById(match[3]);
// Handle the case where IE and Opera return items
// by name instead of ID
if (elem && elem.id != match[3])
return jQuery().find(selector);
// Otherwise, we inject the element directly into the jQuery object
var ret = jQuery(elem || []);
ret.context = document;
ret.selector = selector;
return ret;
}
// HANDLE: $(expr, [context])
// (which is just equivalent to: $(content).find(expr)
} else
return jQuery(context).find(selector);
// HANDLE: $(function)
// Shortcut for document ready
} else if ( jQuery.isFunction( selector ) )
return jQuery( document ).ready( selector );
// Make sure that old selector state is passed along
if ( selector.selector && selector.context ) {
this.selector = selector.selector;
this.context = selector.context;
}
return this.setArray(jQuery.isArray( selector ) ?
selector :
jQuery.makeArray(selector));
},
// Start with an empty selector
selector: "",
// The current version of jQuery being used
jquery: "1.3.2",
// The number of elements contained in the matched element set
size: function() {
/// <summary>
/// 适合当前条件的对象的数量。
/// jQuery核心的一部分
/// </summary>
/// <returns type="Number" />
return this.length;
},
// Get the Nth element in the matched element set OR
// Get the whole matched element set as a clean array
get: function( num ) {
/// <summary>
/// 访问单独一个符合条件的元素,参数num用来访问多个条件元素
/// 的第N个。
/// jQuery核心的一部分。
/// </summary>
/// <returns type="Element" />
/// <param name="num" type="Number">
/// Access the element in the Nth position.
/// </param>
return num == undefined ?
// Return a 'clean' array
Array.prototype.slice.call( this ) :
// Return just the object
this[ num ];
},
// Take an array of elements and push it onto the stack
// (returning the new matched element set)
pushStack: function( elems, name, selector ) {
/// <summary>
/// 把jQuery对象设置为一串元素,用于访问
/// 堆栈。
/// jQuery核心的一部分。
/// </summary>
/// <returns type="jQuery" />
/// <param name="elems" type="Elements">
/// An array of elements
/// </param>
// Build a new jQuery matched element set
var ret = jQuery( elems );
// Add the old object onto the stack (as a reference)
ret.prevObject = this;
ret.context = this.context;
if ( name === "f
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
VS2008Jquery.rar (3个子文件)
jquery-vsdoc.js 200KB
VS90SP1-KB958502-x86.exe 2.13MB
jquery.js 56KB
共 3 条
- 1
资源评论
光阴使者
- 粉丝: 6
- 资源: 70
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功