{"id":13404197,"url":"https://github.com/markgoodyear/scrollup","last_synced_at":"2025-05-15T16:05:12.885Z","repository":{"id":6520790,"uuid":"7761705","full_name":"markgoodyear/scrollup","owner":"markgoodyear","description":null,"archived":false,"fork":false,"pushed_at":"2022-02-06T14:53:46.000Z","size":2262,"stargazers_count":998,"open_issues_count":23,"forks_count":294,"subscribers_count":57,"default_branch":"master","last_synced_at":"2025-04-25T15:11:35.325Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://markgoodyear.com/labs/scrollup/","language":"JavaScript","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/markgoodyear.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.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-01-22T21:30:48.000Z","updated_at":"2025-04-24T08:13:01.000Z","dependencies_parsed_at":"2022-09-08T01:51:03.276Z","dependency_job_id":null,"html_url":"https://github.com/markgoodyear/scrollup","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/markgoodyear%2Fscrollup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markgoodyear%2Fscrollup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markgoodyear%2Fscrollup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markgoodyear%2Fscrollup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markgoodyear","download_url":"https://codeload.github.com/markgoodyear/scrollup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254374410,"owners_count":22060610,"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-07-30T19:01:40.401Z","updated_at":"2025-05-15T16:05:12.863Z","avatar_url":"https://github.com/markgoodyear.png","language":"JavaScript","readme":"# ScrollUp [![Build Status](https://travis-ci.org/markgoodyear/scrollup.svg?branch=master)](https://travis-ci.org/markgoodyear/scrollup) [![devDependency Status](https://david-dm.org/markgoodyear/scrollup/dev-status.svg)](https://david-dm.org/markgoodyear/scrollup#info=devDependencies)\n\u003e A jQuery plugin to create a customisable 'Scroll to top' feature that will work with any website\n\n## Installing with Bower\n\nTo install scrollUp with Bower:\n\n```bash\nbower install scrollup\n```\n\n## How to use\n\nSimply include the `jquery.scrollUp.min.js` file and place the following in the head of your document (make sure **jQuery** is included):\n\n### Minimum setup\n\n```js\n$(function () {\n    $.scrollUp();\n});\n```\n\n**Example with default options**\n\n```js\n$(function () {\n    $.scrollUp({\n        scrollName: 'scrollUp',      // Element ID\n        scrollDistance: 300,         // Distance from top/bottom before showing element (px)\n        scrollFrom: 'top',           // 'top' or 'bottom'\n        scrollSpeed: 300,            // Speed back to top (ms)\n        easingType: 'linear',        // Scroll to top easing (see http://easings.net/)\n        animation: 'fade',           // Fade, slide, none\n        animationSpeed: 200,         // Animation speed (ms)\n        scrollTrigger: false,        // Set a custom triggering element. Can be an HTML string or jQuery object\n        scrollTarget: false,         // Set a custom target element for scrolling to. Can be element or number\n        scrollText: 'Scroll to top', // Text for element, can contain HTML\n        scrollTitle: false,          // Set a custom \u003ca\u003e title if required.\n        scrollImg: false,            // Set true to use image\n        activeOverlay: false,        // Set CSS color to display scrollUp active point, e.g '#00FFFF'\n        zIndex: 2147483647           // Z-Index for the overlay\n    });\n});\n```\n\n### activeOverlay\n\nTo create a visible line to help determine an ideal scroll distance from the top,\nassign a valid CSS colour to the `activeOverlay` setting. This could be HEX, HSLA or RGB(A).\nExample: `activeOverlay: '#00FFFF'`. \u003ca href=\"http://markgoodyear.com/labs/scrollup\" target=\"_blank\"\u003eSee the demo for an example\u003c/a\u003e.\n\n\n### scrollFrom\n\nNew feature in v2.0.0. Display the `scrollUp` element either the set distance from the top (default),\nor from the bottom of the page.\n\n### Destroy method\n\nNew feature in v2.0.0. If you need to destroy the instance of scrollUp,\nsimple use the following to remove all modifications to the DOM:\n\n```js\n$.scrollUp.destroy();\n```\n\n\n## Fully Customizable\nScrollUp is fully customisable via CSS which makes it simple to fit right into your project.\nSimply target the scrollUp's generated ID in your CSS file and set your styles.\nBelow is a basic style example:\n\n```css\n#scrollUp {\n    bottom: 20px;\n    right: 20px;\n    padding: 10px 20px;\n    background-color: #555;\n    color: #fff;\n}\n```\n\n### Use background image\n\nTo use a background image instead of text, simply set `scrollImg: true`.\nThis will allow you to set a background image in your CSS file.\n\n\n## Contributing\n\nPlease see [CONTRIBUTE.md](CONTRIBUTE.md) for info on contributing.\n\n\n## Demo\n\n\u003ca href=\"http://markgoodyear.com/labs/scrollup/\" target=\"_blank\"\u003eCheck out the demo\u003c/a\u003e for more style and feature examples.\n","funding_links":[],"categories":["JavaScript","13. 页面交互"],"sub_categories":["13.11 平滑滚动插件(Smooth Scroll) ###","13.11 平滑滚动插件(Smooth Scroll)"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkgoodyear%2Fscrollup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkgoodyear%2Fscrollup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkgoodyear%2Fscrollup/lists"}