JSFiddle - React, Tailwind, and code Playground

by chris callaghan

HTML

<a class="replaceWith" href="/whatever">not changed</a>

JavaScript

setInterval(function () {

    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);