Socket
Book a DemoInstallSign in
Socket

weichie-progress-scroll

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

weichie-progress-scroll

A simple progress bar on scroll to indicate article length

1.0.1
latest
Source
npmnpm
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

Progress Scroll

A progress bar that shows you how far you are down a page. When reading an article for example. I created this project in plain Javascript, so there is no need to require jQuery at the moment. I will upload a jUqery version later on.

View demo

Progress Scroll

Installation

You can choose to either download this repo and import the progress-scroll.js file in your project yourself, or use NPM to install it.

NPM
npm install weichie-progress-scroll

import { ProgressScroll } from 'weichie-progress-scroll';

Usage

Call ProgressScroll() wherever you like. The function requires 2 parameters, a scroll_bar that will be your custom element you want to use as scroll indicator. The article will be used to measure the height of the article you're reading.

Javascript

ProgressScroll({
   scroll_bar: document.getElementById('progress-scroll'),
   article: document.getElementsByClassName('container')
});

jQuery

ProgressScroll({
   scroll_bar: $('#progress-scroll'),
   article: $('.container')
});

Options

ParameterInfo
scroll_barThe element you want to use as indicator
articleThe article you want to keep track of

Keywords

scroll

FAQs

Package last updated on 05 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.