jQuery addClass example
Change class name on click in jQuery
HTML
<!DOCTYPE html>
<html>
<head>
<!--Import Google Icon Font-->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!--Import materialize.css-->
<link type="text/css" rel="stylesheet" href="http://localhost/say-cure-web/public/css/materialize.css" media="screen,projection" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/css/select2.min.css" rel="stylesheet" />
<link rel="stylesheet" href="http://localhost/say-cure-web/public/css/paddingmargin.css" media="screen,projection">
<link rel="stylesheet" href="http://localhost/say-cure-web/public/css/select2.css" media="screen,projection">
<!--Let browser know website is optimized for mobile-->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>SAY-CURE - Create Product Page</title>
<script src="http://localhost/say-cure-web/public/js/jquery-3.4.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/js/select2.min.js"></script>
<script src="http://localhost/say-cure-web/public/js/materialize.min.js"></script>
</head>
<body>
<form method="POST" action="http://localhost/say-cure-web/public/admin-dashboard/invoice-create/store" id="formId">
<input type="hidden" name="_token" value="c8nUkQveKX66pKdmv7oVRCh4eW38P138LQUTVFUt">
<div class="row clearfix ">
<div class="col s12">
<table class="table table-bordered table-hover tab_logic" id="tab_logic">
<thead class=" purple accent-3 white-text text-darken-2">
<tr>
<th class="text-center"> Product Code </th>
<th class="text-center"> Product Name </th>
<th class="text-center"> Qty </th>
<th class="text-center"> Price </th>
<th class="text-center"> GST </th>
...