Using temp DOM and jQuery's replaceWith is another option
var tempEl = jQuery('<div></div>'); tempEl.load(url, function() { var html = tempEl[0].innerHTML; el.replaceWith(html); });