JSFiddle - React, Tailwind, and code Playground
by Ian Roberts
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/ui-lightness/jquery-ui.css">
<table>
<tr>
<td>
<div class="commentLink">
<a href="#" onclick="ShowBox.call(this); return false;">Show</a>
</div>
<div class="hiddenBox">
some hidden content
</div>
</td>
</tr>
</table>
<div class="superHiddenBox">some super hidden content</div>
<div class="alwayshiddenbox">always hidden</div>
<div class="even">even one</div>
<div class="odd">odd one</div>
<div class="even">even two</div>
<div class="odd">odd two</div>
CSS
.hiddenBox,
.superHiddenBox,
.alwayshiddenbox,
.even,
.odd {
display:none;
}
JavaScript
function ShowBox() {
var thiz = this;
$(function() {
//$(thiz).parents("table").siblings(".superHiddenBox").show();
//$(thiz).parents("table").siblings(".superHiddenBox").css("display","block");
$(thiz).closest('table').next('div').show();
});
}
//.parents("table").siblings(".superHiddenBox").show();
//$('.infoButton').click(function () {
// $(this).closest('table').next('div').show();
//});