Is there a way to append a style to an existing class using Javascript, based on which option you have selected in an html select option drop down?
For example, in the below table, I would like the appropriate number the become bold or highlighted when that number has been selected from the option box.
Thanks so much!
<h2>Finder</h2>
<div class="step1">
<p>Show category:</p>
</div>
<select type="search" class="select-table-filter" data-table="order-table" id="searchInput">
<option value="">All</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
<input type="search" class="light-table-filter" data-table="order-table" placeholder="Search ..." />
<table class="order-table" id="myTable">
<thead>
<tr class="header">
<th>Category</th>
<th>Name</th>
<th>Last Name</th>
<th>Phone</th>
<th>Email</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Taylor</td>
<td>Swift</td>
<td>1234 5678</td>
<td>taytay@gmail.com</td>
</tr>
<tr>
<td>2, 3</td>
<td>John</td>
<td>Smith</td>
<td>1234 5678</td>
<td>johnnyboy@gmail.com</td>
</tr>
<tr>
<td>3</td>
<td>Jane</td>
<td>Doh</td>
<td>1234 5678</td>
<td>dohnut@gmail.com</td>
</tr>
<tr>
<td>3, 4</td>
<td>Taylor</td>
<td>Doh</td>
<td>1234 5678</td>
<td>td@gmail.com</td>
</tr>
</tbody>
</table>