JSFiddle - React, Tailwind, and code Playground

by Cwalkdawg

HTML

<table id="myTable">
    <thead>
        <tr>
            <th class='fc-id1 ui-widget-header'>09:00</th>
        </tr>
        <tr>
            <th class='fc-id2 ui-widget-header'>09:30</th>
        </tr>
        <tr>
            <th class='fc-id3 ui-widget-header'>14:59</th>
        </tr>
    </thead>
    <tbody>
        <tr id='res1'>
            <td class='fc-id4 ui-widget-content fc-resource1'>
                <div class='day-content '></div>
            </td>
        </tr>
        <tr id='res2 '>
            <td class='fc-id5 ui-widget-content fc-resource2 '>
                <div class='day-content'></div>
            </td>
        </tr>
        <tr id='res3'>
            <td class='fc-id6 ui-widget-content fc-resource3'>
                <div class='day-content'></div>
            </td>
        </tr>
    </tbody>
</table>

JavaScript

$('#myTable th').each(function (index) { //add index
    var $this = $(this);
    var d = new Date();
    if ($this.text() === d.getHours() + ":" + d.getMinutes()) {
        $('#res'+(index+1)).find('div.day-content').text("Your text"); //change your text
    }
});