JSFiddle - React, Tailwind, and code Playground
by chris callaghan
HTML
<a class="replaceWith" href="/whatever">not changed</a>
JavaScript
setTimeout(function () {
$('a.replaceWith').replaceWith('<a class="replaceWith" href="/test1">changed</a>');
}, 7500);
setTimeout(function () {
$('a.replaceWith').replaceWith('<a class="replaceWith" href="/test2">change second time</a>');
}, 15000);
setTimeout(function () {
$('a.replaceWith').replaceWith('<a class="replaceWith" href="/test3">change third time</a>');
}, 15000);
setInterval(function () {
$('a.replaceWith').replaceWith('<a class="replaceWith" href="/meteorites-jewellery/meteorite-jewellery"> oringal agian</a>');
setTimeout(function () {
$('a.replaceWith').replaceWith('<a class="replaceWith" href="/test1">changed</a>');
}, 7500);
setTimeout(function () {
$('a.replaceWith').replaceWith('<a class="replaceWith" href="/test2">change second time</a>');
}, 15000);
setTimeout(function () {
$('a.replaceWith').replaceWith('<a class="replaceWith" href="/test3">change third time</a>');
}, 15000);
clearTimeout(timeout);
}, 20000);