removing jQuery use for replaceWith()