{"id":15293400,"url":"https://github.com/onewaytech/jquery.fn.scrollx","last_synced_at":"2025-03-24T15:09:21.678Z","repository":{"id":57282587,"uuid":"112182612","full_name":"OneWayTech/jquery.fn.scrollx","owner":"OneWayTech","description":"Add scrollup / scrolldown / scrollleft / scrollright to jQuery.prototype (debounce integrated)","archived":false,"fork":false,"pushed_at":"2017-12-04T06:18:35.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T19:45:22.788Z","etag":null,"topics":["debounce","jquery","plugin","scroll","scrolldown","scrollleft","scrollright","scrollup"],"latest_commit_sha":null,"homepage":"","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/OneWayTech.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2017-11-27T10:34:25.000Z","updated_at":"2017-11-28T07:11:50.000Z","dependencies_parsed_at":"2022-09-19T23:10:27.191Z","dependency_job_id":null,"html_url":"https://github.com/OneWayTech/jquery.fn.scrollx","commit_stats":null,"previous_names":["kenberkeley/jquery.fn.scrollx"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OneWayTech%2Fjquery.fn.scrollx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OneWayTech%2Fjquery.fn.scrollx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OneWayTech%2Fjquery.fn.scrollx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OneWayTech%2Fjquery.fn.scrollx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OneWayTech","download_url":"https://codeload.github.com/OneWayTech/jquery.fn.scrollx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245294768,"owners_count":20591900,"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":["debounce","jquery","plugin","scroll","scrolldown","scrollleft","scrollright","scrollup"],"created_at":"2024-09-30T16:47:58.782Z","updated_at":"2025-03-24T15:09:21.651Z","avatar_url":"https://github.com/OneWayTech.png","language":"HTML","readme":"# Add `scrollup / scrolldown / scrollleft / scrollright` to `jQuery.prototype` (debounce integrated)\r\n\r\n[![npm version][npm-v-img]][npm-url]\r\n[![npm download][npm-dl-img]][npm-url]\r\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\r\n\r\n## § Demo\r\n[Demo](https://onewaytech.github.io/jquery.fn.scrollx/test.html) ([source code of demo](https://github.com/onewaytech/jquery.fn.scrollx/blob/master/test.html))\r\n\r\n## § Installation\r\n\r\n### ⊙ npm\r\n`npm i -S jquery.fn.scrollx`\r\n\r\n### ⊙ CDN\r\n```html\r\n\u003cscript src=\"//unpkg.com/jquery.fn.scrollx\"\u003e\u003c/script\u003e\r\n```\r\n\r\n## § Usage\r\n\r\n```js\r\nimport $ from 'jquery'\r\nrequire('jquery.fn.scrollx')($)\r\n\r\nconst period = 200 // for debounce\r\n\r\nconst listener = (delta, currentOffset, lastOffset) =\u003e { ... }\r\nlet unlistener\r\nconst unlistenerReceiver = f =\u003e { unlistener = f }\r\n\r\n$('#foo').scrollup(listener, period, unlistenerReceiver)\r\n$('#bar').on('click', unlistener)\r\n```\r\n  \r\n`listener` is required  \r\n`period` (defaults to `100` ms) and `unlistenerReceiver` are optional\r\n\r\ne.g.\r\n\r\n```js\r\n$('#foo').scrolldown(listener)\r\n$('#foo').scrollleft(listener, 300)\r\n$('#foo').scrollright(listener, unlistenerReceiver)\r\n```\r\n\r\n## § Reference\r\n* https://stackoverflow.com/a/7076832/5172890\r\n* https://stackoverflow.com/a/4326907/5172890\r\n\r\n[npm-url]: https://www.npmjs.com/package/jquery.fn.scrollx\r\n[npm-v-img]: http://img.shields.io/npm/v/jquery.fn.scrollx.svg\r\n[npm-dl-img]: http://img.shields.io/npm/dm/jquery.fn.scrollx.svg\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonewaytech%2Fjquery.fn.scrollx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonewaytech%2Fjquery.fn.scrollx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonewaytech%2Fjquery.fn.scrollx/lists"}