Skip to content

Instantly share code, notes, and snippets.

@cbranch101
Created April 12, 2013 20:50
Show Gist options
  • Save cbranch101/5375032 to your computer and use it in GitHub Desktop.
Save cbranch101/5375032 to your computer and use it in GitHub Desktop.
$.get(API_URL + '/posts', {limit : limit, offset : offset, sort_by : sortBy, sort_order : sortOrder, include_headers : includeHeaders}, function(data) {
$('#post-table tbody').empty();
jsonData = JSON.parse(data);
var tableData = jsonData.table_data;
if($('#post-table thead').is(':empty')) {
window.headers = tableData.headers;
buildHeaders(window.headers);
}
var rows = tableData.rows;
buildRows(rows, window.headers);
configurePages(tableData.total_results);
$("#modal-loader").modal('hide');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment