JSFiddle - React, Tailwind, and code Playground

by Russell Bevan

HTML

<p>link some other text</p>
<button>Replace Me</button>

JavaScript

$('button').on('click', function() {
    $('body').html($('body').html().replace('link', '<a href="#link">link</a>'));
});