79101253

Date: 2024-10-18 08:38:35
Score: 0.5
Natty:
Report link

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); 
});
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: user2241415