So I am trying to grey out an HTML table row upon expiry date. I don't want the data to disappear or hide. I just want the row to fade grey or something similar. Maybe make it unclickable? Is this possible with javascript. Apologies for this, but I am not very well versed in javascript, however I do have a light grasp of how it works.
Here's a basic example of my html table (the original is in a div with the bootstrap class: col-lg-8)
<table class="table table-striped">
<thead class="table-dark" align="center">
<th scope="col" align="center" width="400">Training Description</th>
<th scope="col" align="center">Cost (Excl Vat)</th>
<th scope="col" align="center">Location</th>
<th scope="col" align="center">Training Date</th>
<th scope="col" align="center"></th>
</thead>
<thead><th colspan="5" align="center">JUNE 2021</th></thead>
<tbody>
<tr>
<td align="left" valign="middle"><b>Basic Computer Training</b></td>
<td align="center" valign="middle"><b>free</b></td>
<td align="center" valign="middle">Online - Zoom</td>
<td align="center" valign="middle">11-June-2021</td>
<td align="center" valign="middle"><a class="btn btn-dark" href="#" target="_blank" type="button">Register</a></td>
</tr>
</tbody>
</table>
I'd like to grey out and disable the register link a day after the training date. Not sure if this would require the use of a class=""
or id=""
. The data is obviously static data written in html code, as displayed above.
If this question has been asked, I'm sorry, I just haven't been able to find anything on this. Any help is highly appreciated.