mysql からデータを取得しています。取得したデータの最初の行を強調表示したいと考えています。
これは私のコードです
$(document).ready(function() {
$('#example').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "scripts/server_processing.php"
} );
$('tr:eq(2)').addClass( 'tcurrent' );
} );
コードはそのままデータをフェッチしますが、テーブル フットを強調表示します。
これは私のcssです
.tcurrent{background-color:pink;}
これは、既存のコールバックの 1 つを使用して実行できますか?.