git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fixed wrapping of elements that hold text nodes. Thanks to David Flanagan for the...
[jquery.git]
/
src
/
manipulation.js
diff --git
a/src/manipulation.js
b/src/manipulation.js
index
57b607a
..
b5ace4d
100644
(file)
--- a/
src/manipulation.js
+++ b/
src/manipulation.js
@@
-32,7
+32,7
@@
jQuery.fn.extend({
wrap.map(function(){
var elem = this;
- while ( elem.firstChild )
+ while ( elem.firstChild && elem.firstChild.nodeType === 1 )
elem = elem.firstChild;
return elem;