jQuery Datatables align center 1 column

前端 未结 4 1447
太阳男子
太阳男子 2021-02-05 02:51

Want to align center just the first column called \"Status\":

        $(\"#TransactionTable\").DataTable({
            ajax: {
                url: \'/Transactio         


        
4条回答
  •  难免孤独
    2021-02-05 03:32

    Also, you can group the columns to apply one style to many like so:

      columnDefs: [
        { className: 'text-right', targets: [7, 10, 11, 14, 16] },
        { className: 'text-center', targets: [5] },
      ], ...
    

提交回复
热议问题