JSFiddle - React, Tailwind, and code Playground

HTML

<table>
    <tr>
     <td class="width2 padLeft" id="loading_45">text</td> 
    </tr>
</table>

CSS

td.loading
{
    background-image:url("http://dummyimage.com/100/226/c00.gif&text=image");
    color:red;
    background-position:left center;
    background-repeat:no-repeat;
    height:auto; position:absolute;
    text-align:center;
    width:100px;
    height:100px;
}

JavaScript

$('#loading_45').addClass('loading');