I’m trying to click on <tbody> <tr>
and get the value of. <td class = 'hidden' id = game[X]>
in that <tr>
games.ajax :
[
{"game":"1007","Date":"10/04/2008"},
{"game":"1002","Date":"12/14/2008"},
{"game":"1202","Date":"06/14/2010"}
]
<table id = "cccr">
<tr><td id = games.ajax:game[0] ></td></tr>
<tr><td id = games.ajax:game[1] ></td></tr>
<tr><td id = games.ajax:game[2] ></td></tr>
</table>
ALL I GET IS ALERT(undefned)
I want the alert (item) to be 1007 or 1002 or 1202.
<script>
$("#cccr").on("click", "tbody tr", function()
{ item = $(this).attr('game'); alert (item);}
);
</script>