Make HTML Table Rows Clickable

JavaScript and CSS techniques to make entire table rows navigate on click.

Sat May 06 2023
— words · — minutes

Overview

JavaScript and CSS techniques to make entire table rows navigate on click.

Originally published on Jang Keyte's Blog.

This article covers Make HTML Table Rows Clickable — practical notes from real-world web development experience.

Code Examples

<tr class="table-default clickable-row" data-href="/user/detail/1">
jQuery(document).ready(function($) {
    $(".clickable-row").click(function() {
        window.location = $(this).data("href");
    });
});

Read More

For the full Vietnamese version, switch language using the VI | EN toggle above, or visit the original post.


Thanks for reading!

Make HTML Table Rows Clickable

Sat May 06 2023
— words · — minutes

© Kha Thiết Giang | CC BY-NC-SA 4.0