mirror of
https://github.com/jquery/jquery.git
synced 2026-01-25 20:37:55 -05:00
Added a new clone function.
This commit is contained in:
6
src/jquery/jquery.js
vendored
6
src/jquery/jquery.js
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user