Over a million developers have joined DZone.

Linked Table Jquery Plugin

DZone's Guide to

Linked Table Jquery Plugin

Free Resource
This is a simple jquery plugin for adding a click handler to a table row. The click handler searches the descendants of the TR for an anchor with the class "row-link". When found the window.location is set to the value of the href attribute, sending the user to that page.

example: $("table-selector").linkRows();

$.fn.linkRows = function() {
  $(this).each(function() {
    $("a.row-link", "tr").each(function() {
      var $a = $(this);
        .click(function() {
        window.location = $a.attr("href");
  return this;

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}