我正在從MySQL中獲取數據,我想突出顯示所獲取數據的第一行。Datatables - 突出顯示從服務器獲取的任何行
這是我的代碼
$(document).ready(function() {
$('#example').dataTable({
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "scripts/server_processing.php"
});
$('tr:eq(2)').addClass('tcurrent');
});
的代碼就是獲取數據,但凸顯了桌腳。
這是我的CSS
.tcurrent{background-color:pink;}
這可以使用現有的回調之一來完成?
您是否嘗試過'$( 'TBODY TR:第一胎')'? –