jQuery addClass example

Change class name on click in jQuery

HTML

<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Pirelli Deutschland GmbH</title>
    
    <!--  Das sind die Ressourcen von DataTable und jQuery -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.css">
  
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.js"></script>
    
    
    <script>
        $(document).ready(function () {
            $('#tableData').DataTable();
        });
        $('#tableData').dataTable({
            "columns": [
              null,
              {
                  "searchable": false,
                  "orderable": false, "targets": 0
              },
            ]
        });
    </script>
</head>
<body>
    <div id="contentWrapper" class="wrapper">
        <div style="overflow-x:scroll;width:500px;">
        <table id="tableData" class="display">
            <thead>
                <tr>
                    <td>Seriennummer</td>
                    <td id="disCol"></td>
                </tr>
            </thead>
            <tbody >
                <tr class="rowData" id="r1">
                    <td class="cellData" id="r1t1">84564153</td>
                    <td class="cellData" id="r1t2">X</td>
                </tr>
                <tr class="rowData" id="r2">
                    <td class="cellData" id="r2t1">55415741</td>
                    <td class="cellData" id="r2t2">X</td>
                </tr>
               
            </tbody>
        </table>
            </div>
    </div>
</body>
</html>