mutliple tables?
mutliple tables?
If I have multiple tables that I want displayed differently, how would I go about doing so? What I have below is not working.
[code]$(document).ready(function () {
if ($('#dtable').length){
$('#dtable').dataTable({
sPaginationType: "bootstrap",
});
}
else ($("#report").length) {
$("#report").dataTable({
"aaSorting": [
[1, "desc"]
],
sDom: "<'row-fluid dt-header'<'span6'f><'span6 hidden-phone'T>r>t<'row-fluid dt-footer'<'span6 visible-desktop'li><'span6'p>>",
sPaginationType: "bootstrap",
oLanguage: {
sLengthMenu: "Showing: _MENU_",
sSearch: ""
},
oTableTools: {
sSwfPath: "js/include/assets/DT/swf/copy_csv_xls_pdf.swf",
aButtons: [{
"sExtends": "copy",
"sButtonText": '' + "Copy"
}, {
sExtends: "print",
sButtonText: ' Print View'
}, {
sExtends: "pdf",
sPdfOrientation: "landscape",
sPdfMessage: "Your custom message would go here.",
sButtonText: ' Save to PDF'
}, {
sExtends: "xls",
sButtonText: ' Save for Excel'
}]
}
})
} [/code]
[code]$(document).ready(function () {
if ($('#dtable').length){
$('#dtable').dataTable({
sPaginationType: "bootstrap",
});
}
else ($("#report").length) {
$("#report").dataTable({
"aaSorting": [
[1, "desc"]
],
sDom: "<'row-fluid dt-header'<'span6'f><'span6 hidden-phone'T>r>t<'row-fluid dt-footer'<'span6 visible-desktop'li><'span6'p>>",
sPaginationType: "bootstrap",
oLanguage: {
sLengthMenu: "Showing: _MENU_",
sSearch: ""
},
oTableTools: {
sSwfPath: "js/include/assets/DT/swf/copy_csv_xls_pdf.swf",
aButtons: [{
"sExtends": "copy",
"sButtonText": '' + "Copy"
}, {
sExtends: "print",
sButtonText: ' Print View'
}, {
sExtends: "pdf",
sPdfOrientation: "landscape",
sPdfMessage: "Your custom message would go here.",
sButtonText: ' Save to PDF'
}, {
sExtends: "xls",
sButtonText: ' Save for Excel'
}]
}
})
} [/code]
This discussion has been closed.