git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
26580d2
)
Added a new clone function.
author
John Resig
<jeresig@gmail.com>
Thu, 17 Aug 2006 05:14:50 +0000
(
05:14
+0000)
committer
John Resig
<jeresig@gmail.com>
Thu, 17 Aug 2006 05:14:50 +0000
(
05:14
+0000)
src/jquery/jquery.js
patch
|
blob
|
history
diff --git
a/src/jquery/jquery.js
b/src/jquery/jquery.js
index
846c815
..
9d80d05
100644
(file)
--- 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