Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added a new clone function.

  • Loading branch information...
commit 2a4c269a9b7c15477e032a24f92d08dfaeb026e4 1 parent 26580d2
@jeresig jeresig authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/jquery/jquery.js
View
6 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
Please sign in to comment.
Something went wrong with that request. Please try again.