{"id":22092193,"url":"https://github.com/pirxpilot/pager","last_synced_at":"2025-03-23T23:45:24.532Z","repository":{"id":12546400,"uuid":"15216543","full_name":"pirxpilot/pager","owner":"pirxpilot","description":"minimal pager with optional numbers","archived":false,"fork":false,"pushed_at":"2017-12-23T17:47:05.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-01T03:26:39.493Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pirxpilot.png","metadata":{"files":{"readme":"Readme.md","changelog":"History.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-12-16T03:53:11.000Z","updated_at":"2017-02-23T05:26:10.000Z","dependencies_parsed_at":"2022-09-15T18:12:56.292Z","dependency_job_id":null,"html_url":"https://github.com/pirxpilot/pager","commit_stats":null,"previous_names":["code42day/pager"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Fpager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Fpager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Fpager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Fpager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pirxpilot","download_url":"https://codeload.github.com/pirxpilot/pager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245186926,"owners_count":20574554,"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":[],"created_at":"2024-12-01T03:08:36.952Z","updated_at":"2025-03-23T23:45:24.506Z","avatar_url":"https://github.com/pirxpilot.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pager\n\n  Simple pager optionally without numbers.\n  Demo is [here](http://pirxpilot.github.io/pager/)\n\n## Installation\n\n  Install with npm:\n\n    $ npm install -S tiny-pager\n\n## API\n\nYou need a DOM element with `.pager` class to create pager. See [example](example.html)\n\n```js\nvar pager = require('tiny-pager');\nvar numeric = pager(document.querySelector('.numeric')).total(5).render();\n```\n\nThe actual content displayed by pages is CSS driven. By default the page number is displayed but you\ncan style `.active` and `.incactive` class to display whatever you want: custom fonts, shapes,\ncolors etc.\n\n\n### Pager(el)\n\nCreates a pager as a child of `el`\nPager is not rendered until `render` is called\n\n### render()\n\nRender pager - needs to be called whenever number ot total pages changes.\n\n### total(n)\n\nSets number of pages to be displayed. Pages are numbered from 0 to n-1.\nYou need ot call `render` to refresh the component it total changes.\n\n### select(n)\n\nSelects n-th page - n is 0-based\n\n## Events\n\n### show\n\n`show` is generated whenver user clicks on a page, its parameter is a 0-based page number\n\n## License\n\n  MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpirxpilot%2Fpager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpirxpilot%2Fpager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpirxpilot%2Fpager/lists"}