JSFiddle - React, Tailwind, and code Playground

by John-Philip Johansson

HTML

<div id='target'><p>This text will be replaced in 3 seconds</p></div>

JavaScript

new Request.HTML({
    url: '/echo/html/',
    data: {
        html: "<p>Text echoed back to request</p>" + "<script type='text/javascript'>$('target').highlight();<\/script>",
        delay: 3
    },
    method: 'post',
    update: 'target'
}).send();