JSFiddle - React, Tailwind, and code Playground

by grahampcharles

HTML

<p class="fileDetails">
    <span class="filename">text goes here</div>
    <span class="fileSize">text goes here</div>
</p>

<button id="wrapMe">Wrap it!</button>

CSS

.wrapper { border: red 2px solid };

JavaScript

$("#wrapMe").on("click", function()  {
    $(".fileDetails").wrap( $("<div>", { "class": "wrapper"})); 
});