Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/chenxuan0000/seamless-scroll

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/chenxuan0000/seamless-scroll

  • v0.0.9
  • Source
  • Go
  • Socket score

Version published
Created
Source

seamless-scroll

js seamless-scroll plugin

Build Status LICENSE MIT

🌾 sample demo | 📘 中文文档

Browser support

IE
IE
Firefox
Firefox
Chrome
Chrome
Safari
Safari
iOS Safari
iOS
Chrome for Android
Android
IE7+
  • mobile gestures are not supported.

Installation

NPM

npm install seamscroll --save

Usage

const seamless = require('seamscroll')
 `or`
import seamless from 'seamscroll'

seamless.init({
  dom: document.getElementById('demo1')
})

//script tag
<script src="seamscroll.min.js"></script>
<script>
seamless.init({
  dom: document.getElementById('demo1')
})
</script>

Demo

.demo2 {
    width: 600px;
    height: 100px;
    position: relative;
    overflow: hidden;
    margin-top: 100px;
}
.list2 li {
    float: left;
    width: 100px;
    height: 100px;
    margin-right: 20px;
    text-align: center;
    font-size: 20px;
    color: #fff;
    line-height:100px;
    background-color: #ccc;
}
<div class="demo2">
      <ul class="list2 clearfix" id="demo2">
           <li>1</li>
           <li>2</li>
           <li>3</li>
           <li>4</li>
           <li>5</li>
           <li>6</li>
      </ul>
</div>
<script src="seamscroll.min.js"></script>
seamscroll.init({
     dom: document.getElementById('demo2'),
     direction: 2
})

Configure

*Required parameters(dom)

keydescriptiondefaultval
*domthe role of the elementnulldom
stepstep,the faster the rolling speed is faster1Number
hoverStopmouse hover control is enabledtrueBoolean
direction0 down 1 up 2 left 3 right1Number
singleHeightone single stop height(default zero is seamless) => direction 0/10Number
singleWidthone single stop width(default zero is seamless) => direction 2/30Number
waitTimeone single data stop wait time(1s)1000Number

Changelog

See the GitHub release history.

License

seamless-scroll is open source and released under the MIT License.

FAQs

Package last updated on 24 Jan 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

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc