From 2a4c269a9b7c15477e032a24f92d08dfaeb026e4 Mon Sep 17 00:00:00 2001 From: John Resig Date: Thu, 17 Aug 2006 05:14:50 +0000 Subject: [PATCH] Added a new clone function. --- src/jquery/jquery.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 846c81541..9d80d050c 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 -- 2.39.5