> While I love most things in jQuery, one thing I don't get is > replaceWith. This method returns the object you just replaced, which > as far as I can see is 100% worthless, rather than the the object > you're replacing it with. If you do: > > $.(someHtmlElement).replaceWith("<div>my div</div>");
100% worthless? Nah. Consider this: $(someHtmlElement).replaceWith("<div>my div</div>").appendTo('body');