'Datatable target conditioning has red underline. it says double colon expected
the program shows red undeline on target conditioning after i rename the class. it says "targets":[7] error message ':' expected. it was working before.
function load_data(from_date = '', to_date = '')
{
var dataTable = $('#visitor_table').DataTable({
"processing" : true,
"serverSide" : true,
"order" : [],
"ajax" : {
url:"visitor_action.php",
type:"POST",
data:{action:'fetch', from_date:from_date, to_date:to_date}
},
"columnDefs":[
{
<?php
if($visitor->is_master_user())
{
?>
"targets":[7],
<?php
}
else
{
?>
"targets":[6],
<?php
}
?>
"orderable":false,
},
],
});
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
