X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fjquery%2Fjquery.js;fp=src%2Fjquery%2Fjquery.js;h=4f3e03e2d75a994e763ac5bfca7f697044c46ce0;hb=53dc6afc310aa0e5df094304996ef605d4dbbd58;hp=338df7f9601c2714388d07783268f10f4611aad1;hpb=139393fe0978e79c427ad13f1a03a10431ef95e5;p=jquery.git diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 338df7f..4f3e03e 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -228,8 +228,7 @@ jQuery.fn = jQuery.prototype = { jQuery.unique( data ) : data ); }, - clone: function(deep) { - deep = deep != undefined ? deep : true; + clone: function() { var $this = this.add(this.find("*")); if (jQuery.browser.msie) { // Need to remove events on the element and its descendants @@ -242,7 +241,7 @@ jQuery.fn = jQuery.prototype = { // Do the clone var r = this.pushStack( jQuery.map( this, function(a){ - return a.cloneNode( deep ); + return a.cloneNode( true ); }) ); if (jQuery.browser.msie) { @@ -257,15 +256,13 @@ jQuery.fn = jQuery.prototype = { } // copy form values over - if (deep) { - var inputs = r.add(r.find('*')).filter('select,input[@type=checkbox]'); - $this.filter('select,input[@type=checkbox]').each(function(i) { - if (this.selectedIndex) - inputs[i].selectedIndex = this.selectedIndex; - if (this.checked) - inputs[i].checked = true; - }); - } + var inputs = r.add(r.find('*')).filter('select,input[@type=checkbox]'); + $this.filter('select,input[@type=checkbox]').each(function(i) { + if (this.selectedIndex) + inputs[i].selectedIndex = this.selectedIndex; + if (this.checked) + inputs[i].checked = true; + }); // Return the cloned set return r; @@ -955,13 +952,6 @@ jQuery.each( { }; }); -// DEPRECATED -jQuery.each( [ "eq", "lt", "gt", "contains" ], function(i,n){ - jQuery.fn[ n ] = function(num,fn) { - return this.filter( ":" + n + "(" + num + ")", fn ); - }; -}); - jQuery.each( [ "height", "width" ], function(i,n){ jQuery.fn[ n ] = function(h) { return h == undefined ?