You must include the child in your selector. Also your html is incorrect. You lack open tr:
$(".try tr td").click(function() {
alert($(this).attr("value"));
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<table id="try" class="try" cellspacing="0" cellpadding="0">
<tr>
<td style="background:#80FF80;" value="WD">WD</td>
<td style="background:#FFFF80;" value="RD">RD</td>
<td style="background:#879FDE;" value="OD">OD</td>
</tr>
</table>
Run codeHide result source
share