git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Added $(...).map() functionality. (Also closes #1250, imo)
[jquery.git]
/
src
/
jquery
/
jquery.js
diff --git
a/src/jquery/jquery.js
b/src/jquery/jquery.js
index
8988c5e
..
8180a4e
100644
(file)
--- a/
src/jquery/jquery.js
+++ b/
src/jquery/jquery.js
@@
-1189,6
+1189,12
@@
jQuery.fn = jQuery.prototype = {
slice: function() {
return this.pushStack( Array.prototype.slice.apply( this, arguments ) );
},
+
+ map: function(fn){
+ return this.pushStack(jQuery.map( this, function(elem,i){
+ return fn.call( elem, i, elem );
+ }));
+ },
/**
* @private