Front/JS & jQuery
[jQuery][datatables] columnDefs . width
오선지♬
2022. 6. 5. 11:52
728x90
반응형
Ex
$('#table').DataTable({
columnDefs : [
,{ "width": "10%", "targets": [2,3,4] }
,{ "width": "15%", "targets": [1] }
]
➡ targets로 설정된 열의 너비를 설정해준다.
https://datatables.net/reference/option/columns.width
columns.width
columns.width Since: DataTables 1.10 Column width assignment. Description This parameter can be used to define the width of a column, and may take any CSS value (3em, 20px etc). Please note that pixel perfect column width is virtually impossible to achieve
datatables.net
728x90
반응형