JSFiddle - React, Tailwind, and code Playground

by mrmartineau

HTML

<p>a b c</p>

JavaScript

$(document).ready(function() {

    var words = $("p:first").text().split(" ");
    var text = words.join("</div> <div>");
    $("p:first").html("<div>" + text + "</div>");
    $("div").click(function() {
        $(this).css("background-color", "yellow");
    });

});