Skip to content

Commit

Permalink
have wrap methods use children() for XML compatibility
Browse files Browse the repository at this point in the history
References madrobby#593
  • Loading branch information
mislav committed Sep 28, 2012
1 parent 3494ef1 commit 7cd4bcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/zepto.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,9 +425,9 @@ var Zepto = (function() {
wrapAll: function(structure){
if (this[0]) {
$(this[0]).before(structure = $(structure))
structure = structure.get(0)
var children
// drill down to the inmost element
while (structure.children.length) structure = structure.children[0]
while ((children = structure.children()).length) structure = children.first()
$(structure).append(this)
}
return this
Expand Down

0 comments on commit 7cd4bcd

Please sign in to comment.