Posted By

HubertGaulin on 04/02/09


table link open tr td

Versions (?)

Open a link in a cell by clicking anywhere on that cell's row

 / Published in: jQuery

This code was use for openning a pdf file that was in a table cell. This link was the only link/button for each rows. Using this, you can click anywhere on each rows to open it's link page.

  1. $("tr.TrClassName").click(function(){
  2. newURL = $(this).children("td.tdClassName").children("a").attr("href");
  3. // = newURL; // Choose one: Open in the same page
  4.; // Choose one: Open in a new page
  5. return false; // Stops the click that is over the link to open 2 different copies of the same linked page.
  6. });

Report this snippet  

You need to login to post a comment.