Closed aschente closed 6 years ago
I tried to get the google fonts and its working fine except for the page size . Its show all the data instead show every 20 data per paginate.
This is my sample code.
$('#fonts-pagination-container').pagination({ dataSource: 'https://www.googleapis.com/webfonts/v1/webfonts?key=' + google_api_key, locator : 'items', totalNumberLocator: function(response) { // console.log(response.items); // you can return totalNumber by analyzing response content return response.items.length; }, pageSize: 20, className: 'inktoink-pagination', classPrefix: 'inktoink-paginate', ulClassName: 'pagination', callback: function(data, pagination) { var html = paginateTemplate(data); $('#fonts-container').html(html); } });
Btw the plugin is very amazing, keep up the good work.
Its working now, I didn't read the document thorough.
I tried to get the google fonts and its working fine except for the page size . Its show all the data instead show every 20 data per paginate.
This is my sample code.
$('#fonts-pagination-container').pagination({ dataSource: 'https://www.googleapis.com/webfonts/v1/webfonts?key=' + google_api_key, locator : 'items', totalNumberLocator: function(response) { // console.log(response.items); // you can return totalNumber by analyzing response content return response.items.length; }, pageSize: 20, className: 'inktoink-pagination', classPrefix: 'inktoink-paginate', ulClassName: 'pagination', callback: function(data, pagination) { var html = paginateTemplate(data); $('#fonts-container').html(html); } });
Btw the plugin is very amazing, keep up the good work.