JSFiddle - React, Tailwind, and code Playground

HTML

<table>
    <tr>
        <td class="edit" field="qcat_id" user_id="1">MyCat</td>
    </tr>
</table>

JavaScript

var element = $(".edit");

if (element.attr("field") =="qcat_id"){
    alert('yes');
}