Reputation: 2531
<div id="childDivToWrapTwice">Content</div>
var parent = $("<div />");
var child = $("<div />");
child.wrap(parent);
$("#childDivToWrapTwice").wrap(child);
This doesn't seem to be working even though you would think it should.
Upvotes: 0
Views: 30
Reputation: 388316
var parent = $("<div />");
var child = $("<div />");
$("#childDivToWrapTwice").wrap(parent).wrap(child);
Demo: Fiddle
Upvotes: 1