X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fjquery%2Fjquery.js;h=7cd07306b7282bf7d65bc77a1b944bbc3a33f999;hb=85afa7c1ba32e2e867b89e4222a4d27ea97dd20d;hp=8988c5ee107617620e249b4cd36e04cb914b08ee;hpb=3ae74b523ec379a1753d116bb7f1aec8db2c52d4;p=jquery.git diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 8988c5e..7cd0730 100644 --- 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 @@ -2145,7 +2151,8 @@ jQuery.each({ next: "jQuery.nth(a,2,'nextSibling')", prev: "jQuery.nth(a,2,'previousSibling')", siblings: "jQuery.sibling(a.parentNode.firstChild,a)", - children: "jQuery.sibling(a.firstChild)" + children: "jQuery.sibling(a.firstChild)", + contents: "jQuery.nodeName(a,'iframe')?a.contentDocument||a.contentWindow.document:jQuery.makeArray(a.childNodes)" }, function(i,n){ jQuery.fn[ i ] = function(a) { var ret = jQuery.map(this,n);