JSFiddle - React, Tailwind, and code Playground
HTML
<div id="test">Foo</div>
JavaScript
$.ajax({
url: '/echo/html/',
data: {
html: '<p>I am an AJAX response</p>',
delay: 2
},
});
$(document).ajaxSuccess(function() {
$('#test').html("Bar");
});