{"id":25492241,"url":"https://github.com/athm-fe/gotop","last_synced_at":"2025-07-28T19:42:11.100Z","repository":{"id":57099844,"uuid":"130206091","full_name":"athm-fe/gotop","owner":"athm-fe","description":null,"archived":false,"fork":false,"pushed_at":"2018-04-19T11:35:39.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-01T08:46:37.726Z","etag":null,"topics":["gotop","jquery-plugin"],"latest_commit_sha":null,"homepage":"https://athm-fe.github.io/gotop/","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/athm-fe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-19T11:33:20.000Z","updated_at":"2018-04-19T11:37:05.000Z","dependencies_parsed_at":"2022-08-22T23:10:37.277Z","dependency_job_id":null,"html_url":"https://github.com/athm-fe/gotop","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athm-fe%2Fgotop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athm-fe%2Fgotop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athm-fe%2Fgotop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athm-fe%2Fgotop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/athm-fe","download_url":"https://codeload.github.com/athm-fe/gotop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239561518,"owners_count":19659475,"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":["gotop","jquery-plugin"],"created_at":"2025-02-18T22:29:13.066Z","updated_at":"2025-02-18T22:29:13.854Z","avatar_url":"https://github.com/athm-fe.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gotop\n\n该插件只做两件事：\n1. 当滚动超出一屏时，显示返顶按钮；否则，隐藏按钮\n2. 点击返顶按钮时，滚动到页面顶部\n\n请自行使用样式来给返顶按钮定位。\n\n## Usage\n\n和其他控件类似，通过 `data-toggle=\"gotop\"` 或者 JavaScript 都可以初始化返回顶部控件。\n\n```html\n\u003cbutton type=\"button\" data-toggle=\"gotop\"\u003e返回顶部\u003c/button\u003e\n```\n\n或者\n\n```javascript\n$('.js-gotop').gotop();\n```\n\n## Options\n\n无\n\n## Methods\n\n### `.gotop()`\n\n初始化\n\n```javascript\n$('.js-gotop').gotop();\n```\n\n## Events\n\nEvent Type | Description\n---------- | -----------\nshow.fe.gotop | 返回顶部按钮显示的时候触发。\nhide.fe.gotop | 返回顶部按钮隐藏的时候触发。\n\n```javascript\n$('.js-gotop').on('show.fe.gotop', function () {\n  // do something...\n});\n```\n\n# End\n\nThanks to [Bootstrap](http://getbootstrap.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fathm-fe%2Fgotop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fathm-fe%2Fgotop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fathm-fe%2Fgotop/lists"}