paginationjs
paginationjs copied to clipboard
return extra data when using ajax request?
Using the example given in the docs... response is expected to be an array of results. Is there any way to return additional data along with this (not part of the result set) so that it can be accessed in the callback: function(data, pagination)? Preferably I would like to do something like data.results is my result set then have access to data.extra in the callback with my additional data.
dataSource: function(done) {
$.ajax({
type: 'GET',
url: '/test.json',
success: function(response) {
done(response);
}
});
}