Skip to content

Instantly share code, notes, and snippets.

@csessig86
Created March 11, 2013 23:35
Show Gist options
  • Save csessig86/5138926 to your computer and use it in GitHub Desktop.
Save csessig86/5138926 to your computer and use it in GitHub Desktop.
DataSet > DataTables part 3
// Our DataTable information
// Don't need to change anything here
// Unless you want to customize the table format
function showInfo() {
$('#table_div').html( '<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" id="table"></table>' );
// Push the data to the table
$('#table').dataTable( {
"bProcessing":true,
"sPaginationType": "bootstrap",
"iDisplayLength": 100,
"aaData": newDataSet,
"aoColumns": tableColumnSet,
// Pick which column we will sort by default
// For this table, we'll sort ascending by Total FY12 Salary
"aaSorting": [[ 2, "desc" ]],
"oLanguage": {
"sLengthMenu": "_MENU_ records per page"
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment