October 30, 2020 at 1:39 am
#10034942
Keymaster
Hello,
I did a new test here and it’s working. Here’s the code I am using:
JS:
var datatableInit = function() {
var $table = $('#datatable-default').dataTable({
dom: '<"row"<"col-lg-6"l><"col-lg-6"f>><"table-responsive"t>p',
drawCallback: function( settings ) {
if ( typeof Switch !== 'undefined' && $.isFunction( Switch ) ) {
$(function() {
$('input[name="file_public"]').each(function() {
var $this = $( this );
$this.themePluginIOS7Switch();
});
});
}
}
});
$table.find('td :checkbox[name=file_public]').on('change', function() {
console.log('CHECK!');
});
};
$(function() {
datatableInit();
});
HTML:
<table class="table table-bordered table-striped mb-0" id="datatable-default"> <thead> <tr> <th>Rendering engine</th> <th>Browser</th> <th>Platform(s)</th> <th class="d-lg-none">Engine version</th> <th class="d-lg-none">CSS grade</th> </tr> </thead> <tbody> <tr> <td><div class="switch switch-sm switch-info"><input type="checkbox" name="file_public" /></div></td> <td>Internet Explorer 4.0 </td> <td>Win 95+</td> <td class="center d-lg-none">4</td> <td class="center d-lg-none">X</td> </tr> ........... ............ ..................
SS:

We hope this helps!
Please try that and let us know if you need further assistance.
Kind Regards,
Rodrigo.
If you are satisfied with Porto Admin and our support, please leave your comment and rating on ThemeForest downloads page. That helps us a lot: https://themeforest.net/downloads