1 error in the code above, this is right:
var width = $("p").wrapInner("<span></span>").children().width(); $("p").html($("p").children().html());
1 error in the code above, this is right:
var width = $("p").wrapInner("<span></span>").children().width(); $("p").html($("p").children().html());