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