jQuery addClass example

Change class name on click in jQuery

by Павел KLON

HTML

<table id="example_table">
    <tr>
        <th>Column header 1</th>
        <th>Column header 2</th>
        <th>Column header 3</th>
        <th>Column header 4</th>
        <th>Column header 5</th>
    </tr>
    <tr>
        <td>Record 1</td>
        <td>value 1</td>
        <td>value 2</td>
        <td>value 3</td>
        <td>value 4</td>
    </tr>
    <tr>
        <td colspan="5">
            <!-- additional custom info is here (for Record 1) -->  
            какой то контент другой таблицы
        </td>
    </tr>
    <tr>
        <td>Record 2</td>
        <td>value 5</td>
        <td>value 6</td>
        <td>value 7</td>
        <td>value 8</td>
    </tr>
    <tr>
        <td colspan="5">
            <!-- additional custom info is here (for Record 2) -->  
        </td>
    </tr>
    <tr>
        <td>Record 3</td>
        <td>value 9</td>
        <td>value 10</td>
        <td>value 11</td>
        <td>value 12</td>
    </tr>
    <tr>
        <td colspan="5">
            <!-- additional custom info is here (for Record 3) -->  
        </td>
    </tr>
</table>