X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjquery%2Fjquery.js;h=ec9711638fa119650ca8e6c892b036c9275c0e1d;hb=065cd7ecf62c7b2ad5b58d447aca7a9cdb6f7bcb;hp=846c8154124ce63b510eb2736af3122ff5025263;hpb=26580d2675918bb689d55293e734e68671b4dfc6;p=jquery.git diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 846c815..ec97116 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -557,6 +557,12 @@ jQuery.fn = jQuery.prototype = { return jQuery.find(t,a); }), arguments ); }, + + clone: function(deep) { + return this.pushStack( jQuery.map( this, function(a){ + return a.cloneNode( deep != undefined ? deep : true ); + }), arguments ); + }, /** * Removes all elements from the set of matched elements that do not @@ -847,7 +853,7 @@ jQuery.extend({ }); jQuery.each( jQuery.macros.css, function(i,n){ - jQuery.fn[ i ] = function(h) { + jQuery.fn[ n ] = function(h) { return h == undefined ? ( this.length ? jQuery.css( this[0], n ) : null ) : this.css( n, h );