{"id":18750591,"url":"https://github.com/invis1ble/scrollbox","last_synced_at":"2025-08-26T23:37:41.026Z","repository":{"id":6684636,"uuid":"7929688","full_name":"Invis1ble/scrollbox","owner":"Invis1ble","description":"A lightweight jQuery custom scrollbar plugin, that triggers event when reached the defined point.","archived":false,"fork":false,"pushed_at":"2020-10-07T02:49:57.000Z","size":350,"stargazers_count":15,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-15T02:42:36.554Z","etag":null,"topics":["infinite-scroll","jquery-plugin","momentum","scroll","touch-devices","trigger-events","ui"],"latest_commit_sha":null,"homepage":"https://invis1ble.github.io/scrollbox/","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/Invis1ble.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-01-31T03:43:13.000Z","updated_at":"2024-02-21T01:37:58.000Z","dependencies_parsed_at":"2022-08-20T13:00:50.180Z","dependency_job_id":null,"html_url":"https://github.com/Invis1ble/scrollbox","commit_stats":null,"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"purl":"pkg:github/Invis1ble/scrollbox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Invis1ble%2Fscrollbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Invis1ble%2Fscrollbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Invis1ble%2Fscrollbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Invis1ble%2Fscrollbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Invis1ble","download_url":"https://codeload.github.com/Invis1ble/scrollbox/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Invis1ble%2Fscrollbox/sbom","scorecard":{"id":67242,"data":{"date":"2025-08-11","repo":{"name":"github.com/Invis1ble/scrollbox","commit":"e9a68f04d6dc8efbd6bf1effc75275523fb56b98"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 1/28 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 3 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T02:53:00.653Z","repository_id":6684636,"created_at":"2025-08-15T02:53:00.653Z","updated_at":"2025-08-15T02:53:00.653Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272267691,"owners_count":24903757,"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-08-26T02:00:07.904Z","response_time":60,"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":["infinite-scroll","jquery-plugin","momentum","scroll","touch-devices","trigger-events","ui"],"created_at":"2024-11-07T17:12:33.454Z","updated_at":"2025-08-26T23:37:40.995Z","avatar_url":"https://github.com/Invis1ble.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scrollbox\n\n[![Build Status](https://travis-ci.org/Invis1ble/scrollbox.svg?branch=master)](https://travis-ci.org/Invis1ble/scrollbox)\n[![Code Climate](https://codeclimate.com/github/Invis1ble/scrollbox/badges/gpa.svg)](https://codeclimate.com/github/Invis1ble/scrollbox)\n![Bower version](https://img.shields.io/bower/v/scrollbox.svg)\n[![npm version](https://img.shields.io/npm/v/scrollbox.svg)](https://www.npmjs.com/package/scrollbox)\n[![Packagist Prerelease](https://img.shields.io/packagist/v/Invis1ble/scrollbox.svg)](https://packagist.org/packages/Invis1ble/scrollbox)\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)\n\nA lightweight jQuery custom scrollbar plugin, that triggers event when reached the defined point.\n\n[Demo Page](https://invis1ble.github.io/scrollbox/)\n\n## Table of contents\n\n- [Browser compatibility](#browser-compatibility)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Basic features](#basic-features)\n    - [Options](#options)\n    - [Methods](#methods)\n    - [Events](#events)\n- [Infinite scrolling implementation example](#infinite-scrolling-implementation-example)\n- [License](#license)\n\n## Browser compatibility\n\n* IE 7+\n* Firefox\n* Opera (old and new)\n* Safari\n* Chrome\n* Chrome for Android\n\n... and others.\n\nScrollbox is automatically tested on the following browsers\n\n[![Sauce Test Status](https://app.saucelabs.com/browser-matrix/Invis1ble.svg)](https://app.saucelabs.com/u/Invis1ble)\n\n## Installation\n\nSeveral quick start options are available:\n\n* [Download the latest release](https://github.com/Invis1ble/scrollbox/archive/master.zip).\n* Clone the repo: `git clone https://github.com/Invis1ble/scrollbox.git`.\n* Install with [Bower](http://bower.io): `bower install scrollbox`.\n* Install with [npm](https://www.npmjs.com/): `npm install scrollbox`.\n* Install with [Composer](https://getcomposer.org): `composer require invis1ble/scrollbox`.\n\nAfter installing the plugin you have to install [jquery-mousewheel](https://github.com/jquery/jquery-mousewheel).\nYou can simply [download it as archive](https://github.com/jquery/jquery-mousewheel/archive/master.zip) and unpack to desired location.\n\n## Usage\n\nIn order to use the plugin, you have to include styles and script to your html e.g.:\n\n```html\n\u003clink href=\"/path/to/scrollbox.min.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\"\u003e\n\u003cscript src=\"//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"/path/to/jquery.mousewheel.min.js\" type=\"text/javascript\"\u003e\u003c/script\u003e\n\u003cscript src=\"/path/to/scrollbox.min.js\" type=\"text/javascript\"\u003e\u003c/script\u003e\n```\n\nLet's assume that you want to stylize the following element:\n\n```html\n\u003cdiv id=\"long-content-container\"\u003e\n    Here is a long content\n\u003c/div\u003e\n```\n\nThen you should define `max-height` and/or `max-width` of that element:\n\n```css\n#long-content-container {\n    max-height: 200px;\n    max-width: 200px;\n}\n```\n\nand initialize Scrollbox:\n\n```js\n$('#long-content-container').scrollbox();\n```\n\nThat's all.\nNow if real size of the container is greater than the specified `max-height`/`max-width` then the plugin will add scrollbar to it.\n\nYou can stylize scrollbar via `css` or even better by overwriting corresponding `less` variables.\nSee [src/less/](https://github.com/Invis1ble/scrollbox/tree/master/src/less) for more details.\n\n## Basic features\n\n### Options\n\nScrollbox uses several options to configuring behavior. The default options are:\n\n```js\n{\n    distanceToReach: {\n        x: 0,\n        y: 0\n    },\n    wheelSensitivity: 20,\n    momentum: {\n        acceleration: 1600,\n        thresholdTime: 500\n    },\n    startAt: {\n        x: 'left',\n        y: 'top'\n    },\n    templates: {\n        horizontalBar: '\u003cdiv\u003e\u003c/div\u003e',\n        verticalBar: '\u003cdiv\u003e\u003c/div\u003e',\n        horizontalRail: '\u003cdiv\u003e\u003c/div\u003e',\n        verticalRail: '\u003cdiv\u003e\u003c/div\u003e',\n        wrapper: '\u003cdiv\u003e\u003c/div\u003e'\n    }\n}\n```\n\nYou can optionally pass an object containing all of the options that you would like to initialize Scrollbox with e.g.:\n\n```js\n$('#long-content-container').scrollbox({\n    wheelSensitivity: 25,\n    startAt: {\n        y: 'bottom'\n    }\n});\n```\n\nor re-define default values for all instances:\n\n```js\n$.fn.scrollbox.Constructor.getDefault().distanceToReach.y = 100;\n```\n\n#### startAt.x\n\nThe initial position of the scroll on x-axis.\n\nThe value can be `'left'`, `'right'` or number of pixels from the left boundary.\n\n#### startAt.y\n\nThe initial position of the scroll on y-axis.\n\nThe value can be `'top'`, `'bottom'` or number of pixels from the top boundary.\n\n#### distanceToReach.x\n\nThe distance from the left and right boundaries of the content when `reachleft.scrollbox` and `reachright.scrollbox` events should be triggered.\n\nThis option is useful when you want to implement so-called \"infinite scrolling\".\n\n#### distanceToReach.y\n\nThe distance from the top and bottom boundaries of the content when `reachleft.scrollbox` and `reachright.scrollbox` events should be triggered.\n\nThis option is useful when you want to implement so-called \"infinite scrolling\".\n\n#### wheelSensitivity\n\nThe distance in pixels for one fixed step of mouse wheel.\n\nYou probably shouldn't change this value.\n\n#### momentum.acceleration\n\nSwipe acceleration factor.\n\n#### momentum.thresholdTime\n\nThreshold time in milliseconds for detect inertial moving at swipe.\n\n#### templates\n\nNormally you don't need to change this templates, but you can if you want.\n\n### Methods\n\nYou can call some methods of the plugin.\n\n#### .update()\n\nRecalculates scrollbars' positions and sizes.\n\nFor example, If you write the infinite scroll implementation you have to update scrollbar position and size after content has been added.\nTo do this you should simply call `.update()` method:\n\n```js\n$('#long-content-container').scrollbox('update');\n```\n\n#### .scrollBy(deltaX, deltaY, animationOptions)\n\nScrolls by pixels.\n\nSee [.animate()](https://api.jquery.com/animate/#animate-properties-options) for the available values of the `animationOptions`\n\nExample:\n\n```js\n$('#long-content-container').scrollbox('scrollBy', 100, 200);\n```\n\nIf you want to scroll only on y-axis you can pass `0` as `deltaX` value:\n\n```js\n$('#long-content-container').scrollbox('scrollBy', 0, 200);\n```\n\n#### .scrollTo(x, y, animationOptions)\n\nScrolls to specified position.\n\n`x` can be integer (pixels), or string `'left'` or `'right'`.\n\n`y` also can be integer (pixels), or string `'top'` or `'bottom'`.\n \n`'left'`, `'right'`, `'top'` and `'bottom'` means the boundaries.\n\nSee [.animate()](https://api.jquery.com/animate/#animate-properties-options) for the available values of the `animationOptions`\n\nExample:\n\n```js\n$('#long-content-container').scrollbox('scrollTo', 100, 200);\n```\n\nIf you want to scroll only on y-axis you can pass `undefined` as `x` value:\n\n```js\n$('#long-content-container').scrollbox('scrollTo', undefined, 'bottom');\n```\n\n#### .destroy()\n\nCompletely removes all stuff from the element.\n\n### Events\n\nScrollbox triggers a several events during lifecycle.\n\n#### reachleft.scrollbox\n\nTriggered when scrolling reach the left boundary of the content. Respects `distanceToReach.x` option.\n\n#### reachright.scrollbox\n\nTriggered when scrolling reach the right boundary of the content. Respects `distanceToReach.x` option.\n\n#### reachtop.scrollbox\n\nTriggered when scrolling reach the top boundary of the content. Respects `distanceToReach.y` option.\n\n#### reachbottom.scrollbox\n\nTriggered when scrolling reach the bottom boundary of the content. Respects `distanceToReach.y` option.\n\n## Infinite scrolling implementation example\n\n```js\nvar $container = $('#content-container');\n\n$container\n    .on('reachbottom.scrollbox', function () {\n        $.ajax({\n            // options\n        }).done(function (response) {\n            $container\n                .append(response)\n                .scrollbox('update');\n        });\n    })\n    .scrollbox({\n        distanceToReach: {\n            y: 100\n        }\n    });\n```\n\n## License\n\n[The MIT License](./LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finvis1ble%2Fscrollbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finvis1ble%2Fscrollbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finvis1ble%2Fscrollbox/lists"}