i writing simple contexMenu for datatable.i'm using datatables class for create list of data. i want to find first cell of table on right click on each that.
HTML:
jquery:
$("#showTopics tbody").bind("contextmenu",function(event) {
var aata = $(this).children('tr').children('td').eq(0).text();
alert(aata);
return false;
});
HTML
<table id='showTopics' style='line-height:18px;'>
<thead>
<tr>
<th style='width:30%;text-align:right;'>X"</th>
<th style='width:7%;'>a</th>
<th style='width:12%;'>b</th>
<th style='width:11%;'>c</th>
<th style='width:9%;'>d</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
generated tbody with datatables:
below result after generated with datatables and putting between of tbody.
row_selected seting with jquery after using contex menu and clicking on tr.
how can i find that? for example after clicking on first row i must be have 7 and after clicking on second of tr 8.
sorry for my english
<tr class="odd row_selected">
<td class=" sorting_1">7</td>
<td class="">0000-00-00</td>
<td class="">0</td>
<td class="">a</td>
<td class="">aa</td>
</tr>
<tr class="even">
<td class=" sorting_1">8</td>
<td class="">0000-00-00</td>
<td class="">0</td>
<td class="">b</td>
<td class="">bb</td>
</tr>
<td>-cell's context, when you click with right mouse button on it?