Fixed wrapping of elements that hold text nodes. Thanks to David Flanagan for the patch. Fixes #4902.
This commit is contained in:
parent
ad5ba1a72e
commit
991dafae16
2 changed files with 7 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue