JSFiddle - React, Tailwind, and code Playground

HTML

<span class="pmt_new" > <a href="#">0</a> PMs sin leer 
    <br />
   
    </span>

<br><br>
 <div class="nomp" >No tienes mensaje nuevos</div>

CSS

.pmt_new {
font-family: arial;font-size: 11px;display: block; !important;
}

.pmt_new_no {
font-family: arial;font-size: 11px;display: block; !important;
}

.pmt_new_no {
background: red;
}

.nomp {
display: block;
}

.nomp_h {
display: none;
}

JavaScript

jQuery('span:contains("0")').each(function() {
        if(jQuery(this).hasClass('pmt_new'))
        jQuery(this).removeClass("pmt_new").addClass("pmt_new_no");
    });