-
Notifications
You must be signed in to change notification settings - Fork 143
Open
Description
please help, i'm using laravel, I have following the tutorial for celledit, but i have problem and cannot fix it till now, here my code and error
<table id="data_table" class="display table table-hover table-sm">
<thead>
<tr>
<th><b>No.</b></th>
<th>data1</th>
<th>data2</th>
<th>data3</th>
<th>data4</th>
<th>data5</th>
</tr>
</thead>
<tbody>
@foreach ($alfa as $item)
<tr>
<td>{{$item->data1}}</td>
<td>{{$item->data2}}</td>
<td>{{$item->data3}}</td>
<td>{{$item->data4}}</td>
<td>{{$item->data5}}</td>
<td>{{$item->data6}}</td>
</tr>
@endforeach
</tbody>
</table>
<script>
var table;
$(document).ready(function () {
$.noConflict();
table = $('#data_table').DataTable();
table.MakeCellsEditable({
"onUpdate": myCallbackFunction
});
});
function myCallbackFunction(updatedCell, updatedRow, oldValue) {
console.log("The new value for the cell is: " + updatedCell.data());
console.log("The old value for that cell was: " + oldValue);
console.log("The values for each cell in that row are: " + updatedRow.data());
}
</script>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
