The modern DOM equivalent would look almost the same as the jQuery version:
document.querySelector(".class").remove();
document.querySelector(".class").after(...);