JSFiddle - React, Tailwind, and code Playground
JavaScript
$.post('/echo/html/',
{
html: 'This HTML is echoed back by the ajax request. Inline scripts in it will execute when it is used in jQuerys "html()" function. <script type="text/javascript">alert(\'Got this back from Ajax Request\');<\/script>'
},
function(data){
// Executes the inline script twice
$('body').html(data);
$('body').html(data);
$('body').innerHTML = data;
}
);