I have a table. When I click on(within) a TD I need to show a hidden div that contains several more divs inside. Each div inside that hidden container has a text value. I need to select the one which value corresponds to the clicked TD.
JS
$(".clickme").click(function(){
$("#hiddenDiv").hide().fadeIn(200);
if ($(this).text() == $("#hiddenDiv div").text()) {
// HOW DO I SELECT THAT DIV?
// matched div .css("color", "red");
}
});
HTML
<table id="myTbl">
<tr>
<td></td>
<td class="clickme">Left</td>
</tr>
</table>
<div id="hiddenDiv" style="display:none">
<div>Straight</div>
<div>Left</div>
<div>Right</div>
</div>