click on tr redirect new page

Solutions on MaxInterview for click on tr redirect new page by the best coders in the world

showing results for - "click on tr redirect new page"
Isabell
12 Nov 2020
1<table class="table">
2    <tbody>
3        <tr data-url="some_url1">
4            <td>39401602</td>
5            <td>6/21/2013</td>
6            <td class="text-primary">Open</td>
7            <td>$79.99</td>
8            <td>Amazing Widget (16 GB, White)</td>
9            <td>Johnathan Doe</td>
10            <td class="text-right none"> <a href="#" class="tick_icon gridneed_icon"></a>
11    <a class="col-md-offset-1 cross_icon gridneed_icon" data-toggle="modal" href="#deleteproduct"></a>
12
13            </td>
14        </tr>
15        <tr data-url="some_url2">
16            <td>39401602</td>
17            <td>6/21/2013</td>
18            <td class="text-primary">Open</td>
19            <td>$79.99</td>
20            <td>Amazing Widget (16 GB, White)</td>
21            <td>Johnathan Doe</td>
22            <td class="text-right none"> <a href="#" class="tick_icon gridneed_icon"></a>
23    <a class="col-md-offset-1 cross_icon gridneed_icon" data-toggle="modal" href="#deleteproduct"></a>
24
25            </td>
26        </tr>
27    </tbody>
28</table>
Mariangel
23 Feb 2019
1$(function () {
2    $('table.table tr').click(function () {
3        window.location.href = $(this).data('url');
4    });
5})