Skip to content

Instantly share code, notes, and snippets.

@abuabdul
Created July 17, 2016 15:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abuabdul/bc0f491629f6bfce04aee0f70bbaf56d to your computer and use it in GitHub Desktop.
Save abuabdul/bc0f491629f6bfce04aee0f70bbaf56d to your computer and use it in GitHub Desktop.
responsive: {
details: {
display: $.fn.dataTable.Responsive.display.modal({
header: function ( row ) {
var data = row.data();
return 'Details for '+data[0];
}
}),
renderer: function (api, rowIdx, columns) {
var data = $.map(columns, function(col, i) {
return '<tr data-dt-row="'+col.rowIndex+'" data-dt-column="'+col.columnIndex+'">'+
'<td>'+col.title+':'+'</td> '+
'<td>'+col.data+'</td>'+
'</tr>';
}).join('');
return data ? $('<table class="table"/>').append( data ) : false;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment