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
반응형
'Front > JS & jQuery' 카테고리의 다른 글
[jQuery] 선택자 여러개 선택하기 (0) | 2022.06.07 |
---|---|
[jQuery] .siblings() (0) | 2022.06.06 |
[jquery][datatables] 열너비조정 함수모음 (0) | 2022.06.04 |
[js][datatables] columns.adjust() (0) | 2022.06.02 |
[jQuery] .trigger('click') 과 .on('click') (0) | 2022.05.31 |