I'm trying to make a table and need to do something like this in the configuration of the datatable:
$(document).ready(function() {
var conta_col = document.getElementById("input_x").value;
var table = $('#dataart').DataTable( {
....
....
"columns": [
{"width": "10%"},
{"width": "35%"},
{"width": "10%"},
{"width": "6%"},
{"width": "5%"},
while (conta_col >= 1) {
{"width": "5%"};
conta_col--;
},
{"width": "14%"}
],
...
Is it posible??? thank's.