JSFiddle - React, Tailwind, and code Playground

by Maxim Gladkov

HTML

<a href="http://google.com" id="link_id">Google</a>

JavaScript

$(function() { 
    setTimeout(function() {
        var some_new_url = 'http://test.example.com';
        $('#link_id').replaceWith($('<a href="' + some_new_url +'">' + $('#link_id').text() + '</a>'));
    }, 200);
});