JSFiddle - React, Tailwind, and code Playground

by Thulasi Ram.S

HTML

<table id="tblCssClass" width="100%">
    <tr class="Header">
        <th>Name</th>
        <th>Address</th>
        <th>Phone</th>
        <th>Details</th>
    </tr>
    <tr>
        <td><span>Name i</span></td>
        <td><span>Address  i</span></td>
        <td><span>Phone i</span></td>
        <td><span>Details i</span></td>
    </tr>
    <tr>
        <td><span>Name i</span></td>
        <td><span>Address  i</span></td>
        <td><span>Phone i</span></td>
        <td><span>Details i</span></td>
    </tr>
    <tr>
        <td><span>Name i</span></td>
        <td><span>Address  i</span></td>
        <td><span>Phone i</span></td>
        <td><span>Details i</span></td>
    </tr>
    <tr>
        <td><span>Name i</span></td>
        <td><span>Address  i</span></td>
        <td><span>Phone i</span></td>
        <td><span>Details i</span></td>
    </tr>
</table>

JavaScript

$(document).ready(function () {
    $("table tr:not(.Header):odd").addClass("className"); 
    
    $("table tr:not(.Header):even").addClass("className"); 
}