Socket
Socket
Sign inDemoInstall

eriko-scroller.js

Package Overview
Dependencies
0
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    eriko-scroller.js

A library to handle events triggered by scrolling


Version published
Maintainers
1
Created

Readme

Source

【eriko-scroller.js】

version: v1.0.11
last updated: 2020.5.26

Availability

npm install --save eriko-scroller.js

Usage

import { ErikoScroller } from 'eriko-scroller.js';

// target element
var es = new ErikoScroller();
es.addObservableScrollEvent([target id], [option], [debugger]);

// remove listener
es.removeObservableScrollEvent();

Parameter

example

const targetId = '#element';
const option = {
  type: 'w',
  top: 1,
  bottom: 1,
  enterEvent: handleEnterEvent,
  leaveEvent: handleLeaveEvent,
  aboveEvent: handleAboveEvent,
  underEvent: handleUnderEvent,
};
const debugger = true;

document

nametypeoptionaldefault
targetIdstringno
optionobjectno
debuggerbooleanyesfalse
option
nametypeoptionaldefaultoptions
typestringno'w' / 'p'
topnumberyes0
bottomnumberyes0
enterEventfunctionyesnull
leaveEventfunctionyesnull
aboveEventfunctionyesnull
underEventfunctionyesnull

type:
'w': [screen mode] - window.innerHeight
'p': [pixel mode] - pixel

Keywords

FAQs

Last updated on 26 May 2020

Did you know?

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc