4
如何使用鍵盤箭頭鍵操作數據表(jQuery插件)行。我做了一件事如何使用鍵盤箭頭鍵操作jQuery數據錶行
var oTable;
$("#customerdata tbody").click(function(event) {
$(oTable.fnSettings().aoData).each(function(){
$(this.nTr).removeClass('row_selected');
});
var row = $(event.target.parentNode);
row.addClass('row_selected');
var custid=row.find('td:first').text();
if(custid!="No data available in table"){
$('#cust_id').val(custid);
$('#customerdata_filter input').val('');
$("#editmodal").dialog("close");}
});
oTable = $("#customerdata").dataTable({
"bJQueryUI": true,
"bLengthChange": false,
"bPaginate": false,
"sPaginationType": "full_numbers",
"bProcessing": true,
"bServerSide": true,
"sScrollY": "260px",
"sAjaxSource": "/SrikanthTest/customer.do?type=showMinCustomerDetails"
});
但我不知道如何操作光標在行上。
有一個你可能感興趣的作者的插件,它被稱爲KeyTable http://www.sprymedia.co.uk/article/KeyTable – 2011-10-05 11:31:18