JSFiddle - React, Tailwind, and code Playground
by Nick Craver
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/dot-luv/jquery-ui.css">
<table>
<tr class="selectedRow">
<td> </td>
<td> </td>
<td><a onclick="toggleMe()" href="#">Toggle Me Here</a></td>
</tr>
</table>
<div id="box"></div>
CSS
#box
{
width: 200px;
height: 200px;
background-color: Red;
display: none;
}
*
{
margin: 0;
padding: 0;
}
.selectedRow td
{
border: 3px solid red;
width: 100px;
}
JavaScript
$(function() {
$('.selectedRow').click(function(e) {
if(e.target.nodeName != 'A')
$(this).find('td:last a').click();
});
});
function toggleMe() {
$('#box').toggle();
}