{"id":32259235,"url":"https://github.com/thesmart/jquery-scrollspy","last_synced_at":"2025-10-22T19:59:44.756Z","repository":{"id":8240668,"uuid":"9684279","full_name":"thesmart/jquery-scrollspy","owner":"thesmart","description":"A ScrollSpy library for detecting enter/exit of elements in the viewport when the user scrolls","archived":false,"fork":false,"pushed_at":"2016-08-20T19:00:18.000Z","size":363,"stargazers_count":275,"open_issues_count":17,"forks_count":98,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-10-22T19:59:44.342Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thesmart.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":"2013-04-26T00:19:49.000Z","updated_at":"2025-06-23T10:44:49.000Z","dependencies_parsed_at":"2022-08-06T23:15:23.789Z","dependency_job_id":null,"html_url":"https://github.com/thesmart/jquery-scrollspy","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/thesmart/jquery-scrollspy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesmart%2Fjquery-scrollspy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesmart%2Fjquery-scrollspy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesmart%2Fjquery-scrollspy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesmart%2Fjquery-scrollspy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thesmart","download_url":"https://codeload.github.com/thesmart/jquery-scrollspy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesmart%2Fjquery-scrollspy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280503208,"owners_count":26341693,"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","status":"online","status_checked_at":"2025-10-22T02:00:06.515Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-10-22T19:59:40.884Z","updated_at":"2025-10-22T19:59:44.748Z","avatar_url":"https://github.com/thesmart.png","language":"JavaScript","funding_links":[],"categories":["13. 页面交互"],"sub_categories":["13.9 滚动侦测(ScrollSpy) ###","13.9 滚动侦测(ScrollSpy)"],"readme":"# jquery-scrollspy\n\nA jQuery plugin for detecting enter/exit of elements in the viewport when the user scrolls.\n\n## New Features\n\nAdded a couple new features:\n\n * May 2014 - optional window offset, allows for things like floating navs\n * Feb 2014 - supports window resize\n * Nov 2013 - throttles scrollspy events so that event handles only fire every 100 milliseconds\n\n## Usage\n\n```js\n$('.tile').on('scrollSpy:enter', function() {\n\tconsole.log('enter:', $(this).attr('id'));\n});\n\n$('.tile').on('scrollSpy:exit', function() {\n\tconsole.log('exit:', $(this).attr('id'));\n});\n\n$('.tile').scrollSpy();\n\n// or you could do this:\n// $.scrollSpy($('.tile'));\n// or this\n// $('.tile').each(function(i, element) {\n// \t\t$.scrollSpy(element);\n// });\n\n```\n\n# Window Resize\n\nUse the ```scrollSpy:winSize``` event for watching window resize.  This fires any time the window is resized by the user.\n\n```\n$.winSizeSpy().on('scrollSpy:winSize', funcy)\n```\n\n# Contributions\n\nPlease provide pull requests for additional features.  Test cases would be most weclome!\n\nThank you contributors:\n\n * [@Mithgol](https://github.com/Mithgol)\n * [@eithanshavit](https://github.com/eithanshavit)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesmart%2Fjquery-scrollspy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthesmart%2Fjquery-scrollspy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesmart%2Fjquery-scrollspy/lists"}