more.js is a small and simple jQuery plugin that makes having a button to fetch additional resources a breeze. more.js enables developers to easily implement something similar to the GitHub "more" button on the dashboard.
more.js is stupid simple.
<html> <body> <table id="resources-table"> ... </table> <button id="more-btn" class="btn btn-default btn-lg btn-block" data-loading-text="Loading…"> More </button> <script> var currentPage = 1; // This MUST be defined $("#more-btn").more({ url: "http://example.com/resources/json", table: "#resources-table", queryParam: 'query', // default to 'q' pageParam: 'p', // defaults to 'page' dataType: 'xml', // defaults to 'json' bootstrap: true, // defaults to false buildEntries: function(xml) { var html = ... return html; } }); </script> </body> </html>
more.js is licensed under the MIT License. The full text can be found in the LICENSE.md