JSFiddle - React, Tailwind, and code Playground

by TrueBlueAussie

HTML

<div id="divQualCodeFuncPMType">
    <table class="SetDWPParameterTabStyle">
        <tbody>
            <tr class="GridHeaderSystemParamter">
                <td style="display: none">Map Id</td>
                <td style="display: none; width: 30px;">Type Id</td>
                <td style="width: 300px">Material Type</td>
            </tr>
            <tr>
                <td style="display: none"> <span id="lblMapId">10</span>

                </td>
                <td style="display: none"> <span id="Label3">60</span>

                </td>
                <td> <span id="Label1">100% cotton</span>

                </td>
            </tr>
            <tr>
                <td style="display: none"> <span id="lblMapId">20</span>

                </td>
                <td style="display: none"> <span id="Label3">70</span>

                </td>
                <td> <span id="Label1">100% cotton</span>

                </td>
            </tr>
        </tbody>
        <table>
</div>

JavaScript

var x = "cotton";

var $el = $('#divQualCodeFuncPMType > table tbody tr:gt(0)').filter(function(){
    return $('td:nth-child(3) span:contains("' + x + '")', this);
});
$el.css("color", "red");