{"id":13401472,"url":"https://github.com/metafizzy/infinite-scroll","last_synced_at":"2025-12-12T04:03:31.487Z","repository":{"id":894561,"uuid":"646976","full_name":"metafizzy/infinite-scroll","owner":"metafizzy","description":"📜 Automatically add next page","archived":false,"fork":false,"pushed_at":"2025-03-08T13:42:52.000Z","size":5006,"stargazers_count":7462,"open_issues_count":62,"forks_count":1729,"subscribers_count":227,"default_branch":"master","last_synced_at":"2025-05-05T22:35:42.735Z","etag":null,"topics":["ajax","javascript-plugin","jquery-plugin","ui"],"latest_commit_sha":null,"homepage":"https://infinite-scroll.com","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/metafizzy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/contributing.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2010-05-04T17:28:57.000Z","updated_at":"2025-05-01T04:04:59.000Z","dependencies_parsed_at":"2025-04-12T02:45:46.080Z","dependency_job_id":null,"html_url":"https://github.com/metafizzy/infinite-scroll","commit_stats":null,"previous_names":["paulirish/infinite-scroll","infinite-scroll/infinite-scroll"],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metafizzy%2Finfinite-scroll","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metafizzy%2Finfinite-scroll/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metafizzy%2Finfinite-scroll/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metafizzy%2Finfinite-scroll/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metafizzy","download_url":"https://codeload.github.com/metafizzy/infinite-scroll/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253650947,"owners_count":21942232,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ajax","javascript-plugin","jquery-plugin","ui"],"created_at":"2024-07-30T19:01:03.089Z","updated_at":"2025-12-12T04:03:31.125Z","avatar_url":"https://github.com/metafizzy.png","language":"HTML","readme":"# Infinite Scroll\n\n_Automatically add next page_\n\nSee [infinite-scroll.com](https://infinite-scroll.com) for complete docs and demos.\n\n## Install\n\n### Download\n\n- [infinite-scroll.pkgd.min.js](https://unpkg.com/infinite-scroll@5/dist/infinite-scroll.pkgd.min.js) minified, or\n- [infinite-scroll.pkgd.js](https://unpkg.com/infinite-scroll@5/dist/infinite-scroll.pkgd.js) un-minified\n\n### CDN\n\nLink directly to Infinite Scroll files on [unpkg](https://unpkg.com).\n\n``` html\n\u003cscript src=\"https://unpkg.com/infinite-scroll@5/dist/infinite-scroll.pkgd.min.js\"\u003e\u003c/script\u003e\n\u003c!-- or --\u003e\n\u003cscript src=\"https://unpkg.com/infinite-scroll@5/dist/infinite-scroll.pkgd.js\"\u003e\u003c/script\u003e\n```\n\n### Package managers\n\nnpm: `npm install infinite-scroll`\n\nYarn: `yarn add infinite-scroll`\n\n## License\n\nInfinite Scroll v5 is licensed under the MIT License.\n\nWhereas earlier versions of Infinite Scroll were previously dual licensed for commercial and closed-source usage, Infinite Scroll v5 licensing no longer has this distinction. You are free to use Infinite Scroll v5 in commercial and closed-source applications. \n\n## Usage\n\nInfinite Scroll works on a container element with its child item elements\n\n``` html\n\u003cdiv class=\"container\"\u003e\n  \u003carticle class=\"post\"\u003e...\u003c/article\u003e\n  \u003carticle class=\"post\"\u003e...\u003c/article\u003e\n  \u003carticle class=\"post\"\u003e...\u003c/article\u003e\n  ...\n\u003c/div\u003e\n```\n\n### Options\n\n``` js\nlet infScroll = new InfiniteScroll( '.container', {\n  // defaults listed\n\n  path: undefined,\n  // REQUIRED. Determines the URL for the next page\n  // Set to selector string to use the href of the next page's link\n  // path: '.pagination__next'\n  // Or set with {{#}} in place of the page number in the url\n  // path: '/blog/page/{{#}}'\n  // or set with function\n  // path: function() {\n  //   return return '/articles/P' + ( ( this.loadCount + 1 ) * 10 );\n  // }\n\n  append: undefined,\n  // REQUIRED for appending content\n  // Appends selected elements from loaded page to the container\n\n  checkLastPage: true,\n  // Checks if page has path selector element\n  // Set to string if path is not set as selector string:\n  //   checkLastPage: '.pagination__next'\n\n  prefill: false,\n  // Loads and appends pages on intialization until scroll requirement is met.\n\n  responseBody: 'text',\n  // Sets the method used on the response.\n  // Set to 'json' to load JSON.\n\n  domParseResponse: true,\n  // enables parsing response body into a DOM\n  // disable to load flat text\n\n  fetchOptions: undefined,\n  // sets custom settings for the fetch() request\n  // for setting headers, cors, or POST method\n  // can be set to an object, or a function that returns an object\n\n  outlayer: false,\n  // Integrates Masonry, Isotope or Packery\n  // Appended items will be added to the layout\n\n  scrollThreshold: 400,\n  // Sets the distance between the viewport to scroll area\n  // for scrollThreshold event to be triggered.\n\n  elementScroll: false,\n  // Sets scroller to an element for overflow element scrolling\n\n  loadOnScroll: true,\n  // Loads next page when scroll crosses over scrollThreshold\n\n  history: 'replace',\n  // Changes the browser history and URL.\n  // Set to 'push' to use history.pushState()\n  //    to create new history entries for each page change.\n\n  historyTitle: true,\n  // Updates the window title. Requires history enabled.\n\n  hideNav: undefined,\n  // Hides navigation element\n\n  status: undefined,\n  // Displays status elements indicating state of page loading:\n  // .infinite-scroll-request, .infinite-scroll-load, .infinite-scroll-error\n  // status: '.page-load-status'\n\n  button: undefined,\n  // Enables a button to load pages on click\n  // button: '.load-next-button'\n\n  onInit: undefined,\n  // called on initialization\n  // useful for binding events on init\n  // onInit: function() {\n  //   this.on( 'append', function() {...})\n  // }\n\n  debug: false,\n  // Logs events and state changes to the console.\n})\n```\n\n## Browser support\n\nInfinite Scroll v4 supports Chrome 60+, Edge 79+, Firefox 55+, Safari 11+.\n\nFor IE10 and Android 4 support, try [Infinite Scroll v3](https://v3.infinite-scroll.com/).\n\n## Development\n\nThis package is developed with Node.js v14 and npm v6. Manage Node and npm version with [nvm](https://github.com/nvm-sh/nvm).\n\n``` sh\nnvm use\n```\n\nInstall dependencies\n\n``` sh\nnpm install\n```\n\nLint\n\n``` sh\nnpm run lint\n```\n\nRun tests\n\n``` sh\nnpm test\n```\n\n---\n\nBy [Metafizzy 🌈🐻](https://metafizzy.co)\n","funding_links":[],"categories":["HTML","📦 Modules/Packages","Programming Languages"],"sub_categories":["Frontend development","JavaScript"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetafizzy%2Finfinite-scroll","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetafizzy%2Finfinite-scroll","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetafizzy%2Finfinite-scroll/lists"}