JSFiddle - React, Tailwind, and code Playground

by batcave

HTML

<table class="table table-hover ">
    <thead>
        <tr>
            <th>N°</th>
            <th>Titre</th>
            <th>Date</th>
        </tr>
    </thead>
    <tbody>
        <tr style="cursor: pointer;" data-href="http://www.apple.com">
            <td>apple</td>
            <td>apple</td>
        </tr>
        <tr style="cursor: pointer;" data-href="http://www.apple.com">
            <td>apple</td>
            <td>apple</td>
        </tr>
    </tbody>
</table>

JavaScript

$(document).on('click', '[data-href]', function () {
    var url = $(this).data('href');
    if (url && url.length > 0) {
        document.location.href = url;
        return false;
    }
});