JSFiddle - React, Tailwind, and code Playground

by mrchief

HTML

<span class='c1'>Home<sup id='id1' class="c2">[2]</sup></span>

CSS

.c1
{
    text-decoration:underline;
    background:rgba(255,102,0,0.7);
    font-weight:800;
    padding:4px;
    padding-left:5px;
    border-right:ridge #660099;
}

.c2 {
    text-decoration:none;
}

JavaScript

$('#id1').detach().insertAfter('span.c1').removeClass().addClass('c1 c2');