git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
955fdb8
)
Fix for #754
author
Jörn Zaefferer
<joern.zaefferer@gmail.com>
Sun, 7 Jan 2007 11:15:31 +0000
(11:15 +0000)
committer
Jörn Zaefferer
<joern.zaefferer@gmail.com>
Sun, 7 Jan 2007 11:15:31 +0000
(11:15 +0000)
src/jquery/jquery.js
patch
|
blob
|
history
diff --git
a/src/jquery/jquery.js
b/src/jquery/jquery.js
index
30fd03d
..
e3699ae
100644
(file)
--- a/
src/jquery/jquery.js
+++ b/
src/jquery/jquery.js
@@
-1165,15
+1165,21
@@
jQuery.extend({
* as $().each() - which is used to iterate, exclusively, over a jQuery
* object. This function can be used to iterate over anything.
*
* as $().each() - which is used to iterate, exclusively, over a jQuery
* object. This function can be used to iterate over anything.
*
- * @example $.each( [0,1,2], function(i){
- * alert( "Item #" + i + ": " + this );
+ * The callback has two arguments:the key (objects) or index (arrays) as first
+ * the first, and the value as the second.
+ *
+ * @example $.each( [0,1,2], function(i, n){
+ * alert( "Item #" + i + ": " + n );
* });
* });
- * @desc Iterates over the items in an array, accessing both the current item and its index.
+ * @desc This is an example of iterating over the items in an array,
+ * accessing both the current item and its index.
*
*
- * @example $.each( { name: "John", lang: "JS" }, function(i){
- * alert( "Name: " + i + ", Value: " + this );
+ * @example $.each( { name: "John", lang: "JS" }, function(i, n){
+ * alert( "Name: " + i + ", Value: " + n );
* });
* });
- * @desc Iterates over the properties in an Object, accessing both the current item and its key.
+ *
+ * @desc This is an example of iterating over the properties in an
+ * Object, accessing both the current item and its key.
*
* @name $.each
* @param Object obj The object, or array, to iterate over.
*
* @name $.each
* @param Object obj The object, or array, to iterate over.