JSFiddle - React, Tailwind, and code Playground

HTML

<table>
<tr>    
<td>
    <a class="option-detail option-active">blah <img src="image.jpg"/></a>
    </td>
    </tr>
<tr>    
<td>
    <a class="option-detail">blah2 <img src="image.jpg"/></a>
    </td>
    </tr>
    </table>

CSS

.option-active {
    font-weight: bold;
}

JavaScript

$(document).ready(
    function(){
      $("a.option, a.option-detail").click( 
          function(event){
              
            $this = $(this);
            $this.closest( 'table' ).find('a.option, a.option-detail').removeClass( 'option-active' );
              
           $this.addClass('option-active');
          });
});