Responive DataTable lost its responsive property while resizing it.
Responive DataTable lost its responsive property while resizing it.
eldhosee2
Posts: 14Questions: 9Answers: 0
See the attachments ... in mobile view or resizing the web into small scale device screen size ...it's lost it responsiveness..
This discussion has been closed.
Answers
i'm using below javascript to fill the DataTable
$.noConflict;
documentObj = jQuery(document);
documentObj.ready(function(){
var table = jQuery('#datatable-responsive').DataTable( {
responsive: true,
bLengthChange :true,
ajax: {
url: 'getClients.php',
dataSrc: 'aaData',
method:'POST'
},
columns: [
{ data:'client_name'},
{ data:'client_location'},
{ data:'client_region'},
{ data:'client_remarks'},
{ data:'client_status',render: function (data, type, full, meta) {
if (data == 0 ){
return '<label class="bs-label bg-blue">New</label>';
}else if (data ==1){
return '<label class="bs-label bg-green">On Board</label>';
}else {
return '<label class="bs-label bg-red">In-Active</label>';
}
}}
],
select :true
} );
jQuery('.dataTables_filter input').attr("placeholder", "Search...");
});