Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<title>Sandbox</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<style type="text/css" media="screen">
body { background-color: #000; font: 16px Helvetica, Arial; color: #fff; }
td {
   padding: 6px;
   color: black;
   background: #DDD;
}
a {color: white;}
tr a { color:black; text-decoration: underline; }
</style>
</head>
<body>
<table>
  <h1>See: <a href="http://stackoverflow.com/questions/890743/click-entire-row-preserving-middle-click-and-ctrlclick">SO question</a></h1>
  <p>Treating the entire TR element as a link...</p>
  <p>Tested in IE6/7, Opera 9, FF3, Chrome 2</p>
  <a href="http://google.com">
  <tr>
    <td>Real link</td>
    <td>Normal text</td>
    <td>Normal text</td>
  </tr>
    </a>
  <tr>
    <td><a href="http://yahoo.com">Real link</a></td>
    <td>Normal text</td>
    <td>Normal text</td>
  </tr>
  <tr>
    <td><a href="http://msn.com">Real link</a></td>
    <td>Normal text</td>
    <td>Normal text</td>
  </tr>
  <tr>
    <td><a href="http://stackoverflow.com">Real link</a></td>
    <td>Normal text</td>
    <td>Normal text</td>
  </tr>
  <tr>
    <td><a href="http://apple.com">Real link</a></td>
    <td>Normal text</td>
    <td>Normal text</td>
  </tr>
</table>
</body>
</html>
Output

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers