JSFiddle - React, Tailwind, and code Playground

HTML

<div id="stuff">
    <button class="button">Click me!</button>
    <p>Stuff within the #stuff.</p>
</div>

JavaScript

var $stuff = $('#stuff'),
    ajaxContent = $stuff.html();

$stuff.on('click', '.button', function(){
    $.get('/echo/html/', function(){
        $stuff.empty();
        console.log($stuff.html());
        alert($stuff.html());
        $stuff.html(ajaxContent);
        console.log($stuff.html());
    });
});