I'm having issues with displaying/hiding content when clicking on a table row. Here is the simplified code snippet:
HTML:
<table>
<tr onclick="showDetails()">
<td>Some text
<br> <span class="hiddenContent">Some hidden content</span>
</td>
<td>Some More Text
<br> <span class="hiddenContent">Some hidden content</span>
</td>
</tr>
<tr onclick="showDetails()">
<td>Some text
<br> <span class="hiddenContent">Some hidden content</span>
</td>
<td>Some More Text
<br> <span class="hiddenContent">Some hidden content</span>
</td>
</tr>
</table>
JavaScript:
function showDetails() {
$(".hiddenContent").hide();
$(this).find(".hiddenContent").show();
}