在每个匹配元素的上下文中执行一个函数。

这意味着每次执行传入的函数(对于每个匹配的元素都是一次),“this”关键字指向特定的DOM元素。 此外,函数在执行时传递一个参数,表示元素在匹配集(整数,零索引)中的位置。 在每个函数中返回'false'会完全停止遍历所有元素的循环(这就像使用正常循环的'break'一样)。 从循环中返回'true'跳到下一次迭代(这就像使用正常循环的'continue'一样)。

在每个匹配元素的上下文中执行一个函数。

这意味着每次执行传入的函数(对于每个匹配的元素都是一次),“this”关键字指向特定的DOM元素。 此外,函数在执行时传递一个参数,表示元素在匹配集(整数,零索引)中的位置。 在每个函数中返回'false'会完全停止遍历所有元素的循环(这就像使用正常循环的'break'一样)。 从循环中返回'true'跳到下一次迭代(这就像使用正常循环的'continue'一样)。

在匹配集中的指定索引处访问单个匹配的DOM元素。

这使您可以提取实际的DOM元素并直接对其进行操作,而无需在其上使用jQuery功能。 这个被称为$(this).get(0)的函数相当于在jQuery对象本身上使用方括号表示法,如$(this)[0]。

Extends the jQuery object itself.

Can be used to add functions into the jQuery namespace. See 'jQuery.fn.extend' for more information on using this method to add Plugins.

Extends the jQuery element set to provide new methods (used to make a typical jQuery plugin).

Can be used to add functions into the to add plugin methods (plugins).

Run this function to give control of the $ variable back to whichever library first implemented it.

This helps to make sure that jQuery doesn't conflict with the $ object of other libraries. By using this function, you will only be able to access jQuery using the 'jQuery' variable. For example, where you used to do $("div p"), you now must do jQuery("div p"). NOTE: This function must be called after including the jQuery javascript file, but before including any other conflicting library, and also before actually that other conflicting library gets used, in case jQuery is included last.

适用浏览器:IE8、360、FireFox、Chrome、Safari、Opera、傲游、搜狗、世界之窗.

来源:懒人