Using replaceWith

Using replaceWith

Hello all,

please consider this code snippet, which works fine:

  1.     ld: function ($t, $h) { //load HTML of target selection into DOM
  2.         var $c = $h.clone();
  3.         $c.find("script").remove(); //prevent double firing of scripts
  4.         $t.html($c.html()); //inject div into primary DOM
  5.     }

I would like to tranpose the last line to use replaceWith() instead of html()