{"id":13518710,"url":"https://github.com/samccone/scrollin","last_synced_at":"2025-10-23T20:23:10.540Z","repository":{"id":31941535,"uuid":"35511194","full_name":"samccone/scrollin","owner":"samccone","description":":scroll: A leak free performance focused scroll util","archived":false,"fork":false,"pushed_at":"2016-07-07T16:00:36.000Z","size":70,"stargazers_count":122,"open_issues_count":3,"forks_count":9,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-26T09:51:11.731Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/samccone.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-12T20:33:17.000Z","updated_at":"2023-03-19T12:49:29.000Z","dependencies_parsed_at":"2022-08-25T07:51:00.390Z","dependency_job_id":null,"html_url":"https://github.com/samccone/scrollin","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samccone%2Fscrollin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samccone%2Fscrollin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samccone%2Fscrollin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samccone%2Fscrollin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samccone","download_url":"https://codeload.github.com/samccone/scrollin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247704515,"owners_count":20982292,"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-08-01T05:01:48.046Z","updated_at":"2025-10-23T20:23:10.462Z","avatar_url":"https://github.com/samccone.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"Scrollin\n==\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eDo something great when an element enters the viewport.\u003c/strong\u003e\n  \u003ca href=\"https://travis-ci.org/samccone/scrollin\"\u003e\u003cimg alt=\"Build Status\" src=\"https://travis-ci.org/samccone/scrollin.svg\" /\u003e\u003c/a\u003e \u003cbr/\u003e\n  \u003cimg alt=\"scrollin\" width=\"300px\" src=\"https://cloud.githubusercontent.com/assets/883126/7601542/595b08ce-f8e5-11e4-9ba5-ee868f3004b9.png\"/\u003e\n\u003c/p\u003e\n\nInstall\n==\n\u003ch4\u003e\n  \u003cpre align=\"center\"\u003enpm i scrollin\u003c/pre\u003e\n  \u003cpre align=\"center\"\u003ebower i scrollin\u003c/pre\u003e\n\u003c/h4\u003e\n\nUse\n==\n```js\nScrollin.track(document.querySelector('#hi'), () =\u003e alert('hi!'))\n```\n\nOptions\n==\nYou can specify optional offset params to control when an elements is considered in the \"viewport\".\n\n```js\nScrollin.track(document.querySelector('#hi'), () =\u003e alert('hi!'), {\n  top: 10,\n  right: -10,\n  bottom: 10,\n  left: 10\n})\n```\n\nAPI\n==\n* `Scrollin.track(document.querySelector('#hi'), () =\u003e alert('hi!'))`\n* `Scrollin.track(document.querySelectorAll('.hi'), () =\u003e alert('hi!'))`\n* `Scrollin.untrackAll()`\n* `Scrollin.untrack(document.querySelector('#hi'))`\n* `Scrollin.checkForVisibleElements()`\n* `Scrollin.getTracking()`\n\nDev\n==\n* `npm i`\n* `npm run dev`\n\n#### Building\n\n* `npm run compile`\n\n#### Polyfill Caveats\n\n* You may need to polyfill `window.requestAnimationFrame`\n* You may need to polyfill `Array.prototype.splice`\n* You may need to polyfill `Array.prototype.some`\n\n📜\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamccone%2Fscrollin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamccone%2Fscrollin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamccone%2Fscrollin/lists"}