JSFiddle - React, Tailwind, and code Playground

by MarkKramer

HTML

<table>
    <tr>
        <td>
            <!--Now give each link a unique ID so you can set the
            redirect address using jQuery-->
            <a class="fancybox" id="link1" href="#">
                LT5C260A436C41
            </a>
        </td> 
        <td>more data</td>
    </tr>
    <tr>
        <td>
            <a class="fancybox" id="link2" href="#">
                LA5C260D436C41
            </a>
        </td> 
        <td>
            more data
        </td>
    </tr>
  ...
</table>

JavaScript

/*
/ Now you set the link address down here instead of in the href attribute
*/
$('#link1').click(function(){
    // do whatever I want here, then redirect
    window.location.href = "detail.aspx?CID=67525";
});
$('#link2').click(function(){
    // do whatever I want here, then redirect
    window.location.href = "detail.aspx?CID=17522";
});

$("table tr").click(function(e) {
    e.stopImmediatePropagation();
    $(this).find("a").trigger('click');
});