我为datatable编写简单的contexMenu。我正在使用datatables
类来创建数据列表。我想找到表格的第一个单元格右键单击每个单元格,我怎样才能找到它?
对不起我的英文 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>