New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ue-scroll-js

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ue-scroll-js

Lightweight JavaScript library for scroll up

latest
Source
npmnpm
Version
2.0.2
Version published
Weekly downloads
47
17.5%
Maintainers
1
Weekly downloads
 
Created
Source

ue-scroll.js

Lightweight JavaScript library for scroll up.

Demo and documentation: https://azrsix.github.io/ue-scroll-js/

Getting Started

$ npm install ue-scroll-js --save

or Yarn

$ yarn add ue-scroll-js

Using CDN

<link rel="stylesheet" href="//unpkg.com/ue-scroll-js@latest/dist/ue-scroll.min.css">
<script src="https://unpkg.com/ue-scroll-js"></script>

Basic Usage

<html>
  <head>
    <!-- Read CSS and JS -->
    <link rel="stylesheet" href="/path/to/ue-scroll-js/dist/ue-scroll.min.css">
    <script src="/path/to/ue-scroll-js/dist/ue-scroll.min.js"></script>
  </head>
  <body>
    <main>
      Your main contents
    </main>
    <!-- Run this script -->
    <div id="ue-scroll" class="ue-scroll btn-white arrow-black circle shadow"></div>
    <script>
      UeScroll.init();
    </script>
  </body>
</html>

or Set initial options

<!-- Run this script -->
<div id="my-custom-id" class="ue-scroll btn-white arrow-black circle shadow"></div>
<script>
  UeScroll.init({
    element: '#my-custom-id',
    scrollSpeed: 10
  });
</script>

Use on ES6 modules

'use strict';
import ue from 'ue-scroll-js';
// Run this script
ue.init();

By the default, ue-scroll.js automatically detect element having '#ue-scroll'. It needs to be started after DOM is rendered.

Options

KeyData TypeDefault ValueDescription
elementString'#ue-scroll'Specify an element with a CSS selector.
positionNumber200Specify the scroll position where the button is displayed.
scrollSpeedNumber10Specify the speed of scrolling (Recommend 20 or less)
fadeSpeedNumber10Specify the speed of fade (Recommend 20 or less)
cancelByScrollBooleantrueCancel scrolling when scroll down (This setting is ignored on touch devices)
cancelByClickBooleantrueCancel scrolling when window clicking.
cancelByKeydownBooleantrueCancel scrolling when pressed any key.

In addition, You can freely change the color, design, position etc of buttons with CSS!

Examples

Please refer to the documentation.

Keywords

scroll

FAQs

Package last updated on 16 Feb 2020

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