1、why is jquery
  • Only 32kB minified and gzipped. Can also be included as an AMD module
  • Supports CSS3 selectors to find elements as well as in style property manipulation
  • IE, Firefox, Safari, Opera, Chrome, and more

2、Downloading jQuery using Bower
jQuery is registered as a package with Bower. You can install the latest version of jQuery with the command:
bower install jquery

This will install jQuery to Bower's install directory, the default being bower_components. Within bower_components/jquery/dist/ you will find an uncompressed release, a compressed release, and a map file.
if you wish to install just the compressed jQuery 2.1.0, you can install just that file with the following command:
bower install http://code.jquery.com/jquery-2.1.4.min.js

3、Using jQuery with a CDN
CDNs can offer a performance benefit by hosting jQuery on servers spread across the globe. This also offers an advantage that if the visitor to your webpage has already downloaded a copy of jQuery from the same CDN, it won't have to be re-downloaded.

<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
To see all available files and versions, visit http://code.jquery.com

4、References:
 
5、plugins with AMD
/*==============jquery插件queue.js,符合AMD规范============*/

define( [
"./core",
"./data/var/dataPriv",
"./deferred",
"./callbacks"
], function( jQuery, dataPriv ) { jQuery.extend( {
queue: function( elem, type, data ) {
//...
}, dequeue: function( elem, type ) {
//...
}, // Not public - generate a queueHooks object, or return the current one
_queueHooks: function( elem, type ) {
//...
}
} ); jQuery.fn.extend( {
queue: function( type, data ) {
//...
},
dequeue: function( type ) {
return this.each( function() {
jQuery.dequeue( this, type );
} );
},
clearQueue: function( type ) {
return this.queue( type || "fx", [] );
}, // Get a promise resolved when queues of a certain type
// are emptied (fx is the type by default)
promise: function( type, obj ) {
//...
}
} ); return jQuery;
} ); /*=============core.js==================*/
define( [
"./var/arr",
"./var/document",
"./var/slice",
"./var/concat",
"./var/push",
"./var/indexOf",
"./var/class2type",
"./var/toString",
"./var/hasOwn",
"./var/support",
"./core/DOMEval"
], function( arr, document, slice, concat,
push, indexOf, class2type, toString, hasOwn, support, DOMEval ) { var
version = "@VERSION", // Define a local copy of jQuery
jQuery = function( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced'
// Need init if jQuery is called (just allow error to be thrown if not included)
return new jQuery.fn.init( selector, context );
}, // Support: Android<4.1
// Make sure we trim BOM and NBSP
rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, // Matches dashed string for camelizing
rmsPrefix = /^-ms-/,
rdashAlpha = /-([a-z])/g, // Used by jQuery.camelCase as callback to replace()
fcamelCase = function( all, letter ) {
return letter.toUpperCase();
}; jQuery.fn = jQuery.prototype = { // The current version of jQuery being used
jquery: version, constructor: jQuery, // The default length of a jQuery object is 0
length: ,
// Execute a callback for every element in the matched set.
each: function( callback ) {
return jQuery.each( this, callback );
}, map: function( callback ) {
return this.pushStack( jQuery.map( this, function( elem, i ) {
return callback.call( elem, i, elem );
} ) );
}
}; jQuery.extend = jQuery.fn.extend = function() {
//...
}; jQuery.extend( { // Unique for each copy of jQuery on the page
expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), // Assume jQuery is ready without the ready module
isReady: true, error: function( msg ) {
throw new Error( msg );
}
} ); return jQuery;
} );

fundamentals of the jQuery library的更多相关文章

  1. jQuery Mobile入门

    转:http://www.cnblogs.com/linjiqin/archive/2011/07/17/2108896.html 简介:jQuery Mobile框架可以轻松的帮助我们实现非常好看的 ...

  2. jQuery extend方法使用及实现

    一.jQuery extend方法介绍 jQuery的API手册中,extend方法挂载在jQuery和jQuery.fn两个不同对象上方法,但在jQuery内部代码实现的是相同的,只是功能却不太一样 ...

  3. 功能齐全并且比较时髦的Jquery通用开源框架之【ejq.js】

    简介 ejq是一款非常小巧的JS工具库,未压缩才50K,在jquery的基础上对jquery缺失部分作了很好的弥补作用. 优点: 1.具有内置的模板解析引擎语法和angularjs相近减少学习成本 2 ...

  4. 很不错的jQuery学习资料和实例

    这些都是学习Jquery很不错的资料,整理了一下,分享给大家. 希望能对大家的学习有帮助. 帕兰 Noupe带来的51个最佳jQuery教程和实例, 向大家介绍了jQuery的一些基本概念和使用的相关 ...

  5. jquery mobile 教程

    简介:jQuery Mobile框架可以轻松的帮助我们实现非常好看的.可跨设备的Web应用程序.我们将后续的介绍中向大家介绍大量的代码及实例. jQuery一直以来都是非常流行的富客户端及Web应用程 ...

  6. [转]Jquery通用开源框架之【ejq.js】

    ejq是一款非常小巧的JS工具库,未压缩才50K,在jquery的基础上对jquery缺失部分作了很好的弥补作用. 优点: 1.具有内置的模板解析引擎语法和angularjs相近减少学习成本 2.能够 ...

  7. 转:VS2008 vs2010中JQUERY智能提醒

    第一步: 安装VS 2008 SP1 VS 2008 SP1 在Visual Studio中加了更丰富的JavaScript intellisense支持,对很大部分的JavaScript库加了代码完 ...

  8. myeclipse10添加jQuery自动提示

    首先先要在装上spket插件,这个网上有好多教程,我就不详细说了,主要说一下后面的设置,因为我发现我按照网上的装完也设置完没办法使用自动提示功能,以下是我根据前辈的经验然后自己摸索出来的: 选中所建的 ...

  9. jQuery Mobile入门教程

    简介:jQuery Mobile框架可以轻松的帮助我们实现非常好看的.可跨设备的Web应用程序.我们将后续的介绍中向大家介绍大量的代码及实例. jQuery一直以来都是非常流行的富客户端及Web应用程 ...

随机推荐

  1. Chrome 的扩展功能

    chrome浏览器修改cookie edit this cookie chrome插件是一款专为谷歌内核浏览器打造的cookie插件,安装谷歌浏览器edit this cookie插件后你就可以在浏览 ...

  2. phpcms黄页,不能选择行业。解决办法

    用phpcms黄页模块,发布产品的时候.不能选择 产品分类,点开之后,啥都没有,是空的. 这个是因为:js的问题. 解决办法:将 网站根目录的 js 文件中的两个文件,更换为 官方的两个js文件.即可 ...

  3. Agile.Net 组件式开发平台 - 驱动开发示例

    首先讲一下概念,此驱动非彼驱动.在Agle.Net中我们将组件规划成两种类型,一种是基于业务的窗体组件,一种是提供扩展功能的驱动组件. 打个比方例如一般系统中需要提供身份证读卡功能,然而市面上有很多种 ...

  4. 高性能python

    参考来源:Python金融大数据分析第八章 提高性能有如下方法 1.Cython,用于合并python和c语言静态编译泛型 2.IPython.parallel,用于在本地或者集群上并行执行代码 3. ...

  5. SpringBoot2.0(四) 远程调试

    和tomcat远程调试近似的配置,主要的配置如下所示: -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=10009 在 ...

  6. WPF中DataGrid的应用-绑定,增改删,分页,样式

    参考以下网址: http://www.cnblogs.com/fwbnet/archive/2012/05/08/2490974.html

  7. 【题解】洛谷9月月赛加时赛 —— Never·island

    有趣有趣~ヾ(✿゚▽゚)ノ真的很有意思的一道dp题!感觉可以提供很多非常有意思的思路~ 现场打的时候考虑了很久,但并没有做出来,主要还是卡在了两个地方:1.考虑到按照端点来进行dp,但没有办法将两个端 ...

  8. BZOJ1009:[HNOI2008]GT考试——题解

    http://www.lydsy.com/JudgeOnline/problem.php?id=1009 Description 阿申准备报名参加GT考试,准考证号为N位数X1X2....Xn(0&l ...

  9. BZOJ1086:[SCOI2005]王室联邦——题解

    http://www.lydsy.com/JudgeOnline/problem.php?id=1086 题面源于洛谷. 题目描述 “余”人国的国王想重新编制他的国家.他想把他的国家划分成若干个省,每 ...

  10. [Leetcode] Binary tree inorder traversal二叉树中序遍历

    Given a binary tree, return the inorder traversal of its nodes' values. For example:Given binary tre ...