/*
* This file has been commented to support Visual Studio Intellisense.
* You should not use this file at runtime inside the browser--it is only
* intended to be used only for design-time IntelliSense. Please use the
* standard jQuery library for all production use.
*
* Comment version: 1.2.6a
*/
/*
*billsquall汉化
*感谢之前为API1.1 1.2汉化的各位高手,参考了不少^^
*感谢shawphy,鼓励我的好人!
*不知道有没有侵权的说法,反正这汉化仅供大家参考,版权方面不负任何责任。
*估计不会有人拿去做什么吧?不要用做商业用途,否则后果自负。
*/
(function(){
/*
* jQuery 1.2.6 - New Wave Javascript
*
* Copyright (c) 2008 John Resig, http://jquery.com/
*
* 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: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $
* $Rev: 5685 $
*/
// Map over jQuery in case of overwrite
var _jQuery = window.jQuery,
// Map over the $ in case of overwrite
_$ = window.$;
var 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>
/// <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)
var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,
// Is it a simple selector
isSimple = /^.[^:#\[\.]*$/,
// Will speed up references to undefined, and allows munging its name.
undefined;
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;
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] );
// Make sure an element was located
if ( elem ){
// Handle the case where IE and Opera return items
// by name instead of ID
if ( elem.id != match[3] )
return jQuery().find( selector );
// Otherwise, we inject the element directly into the jQuery object
return jQuery( elem );
}
selector = [];
}
// 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 )[ jQuery.fn.ready ? "ready" : "load" ]( selector );
return this.setArray(jQuery.makeArray(selector));
},
// The current version of jQuery being used
jquery: "1.2.6",
// The number of elements contained in the matched element set
size: function() {
/// <summary>
/// The number of elements currently matched.
/// Part of Core
/// </summary>
/// <returns type="Number" />
return this.length;
},
// The number of elements contained in the matched element set
length: 0,
// Get the Nth element in the matched element set OR
// Get the whole matched element set as a clean array
get: function( num ) {
/// <summary>
/// Access a single matched element. num is used to access the
/// Nth element matched.
/// Part of Core
/// </summary>
/// <returns type="Element" />
/// <param name="num" type="Number">
/// Access the element in the Nth position.
/// </param>
return num == undefined ?
// Return a 'clean' array
jQuery.makeArray( 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 ) {
/// <summary>
/// Set the jQuery object to an array of elements, while maintaining
/// the stack.
/// Part of Core
/// </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;
// Return the newly-formed element set
return ret;
},
// Force the current matched set of elements to become
// the specified array of elements (destroying the stack in the process)
// You should use pushStack() in order to do this, but maintain the stack
setArray: function( elems ) {
/// <summary>
/// Set the jQuery object to an array of elements. This operation is
/// completely destructive - be
jquery源文件和API文档
3星 · 超过75%的资源 需积分: 9 73 浏览量
2009-10-10
18:52:22
上传
评论
收藏 280KB RAR 举报
lij_ok
- 粉丝: 0
- 资源: 7
最新资源
- 第十四章 scikit-learn 库(jupyter版 人工智能编程基础)
- 天天视频(一款功能强大的影视剧应用 电.apk
- 一个xxs做的python小游戏,当对方血量比你低时可以一直攻击(什么时候改改?)
- 第十三章 Matplotlib库(jupyter版 人工智能编程基础)
- 基于yolov8的人体动作识别检测项目源码.zip
- 自然语言处理大作业-python的汉语词义自动消歧系统源码+报告.zip
- MT管理器_2.15.3-会员功能解锁.apk
- 基于机器学习的共享单车使用量分析与预测
- 基于Python开发的汉语词义自动消歧系统源码+超详细注释+实验报告(95分以上).zip
- 51单片机汇编语言音乐盒+电子琴,proteus仿真运行正常,开发板实物运行正常 代码都带有注释,方便理解和学习
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈