mgn-conveyor

0.0.0 • Public • Published

mgn-conveyor ( Don't Need jQuery )

Implement function to slide images or elements in an infinite loop.

  • Target browser : IE9+

Install

npm i mgn-conveyor -S

Or Download raw data

↓ download "mgn-conveyor.js"


Import

import mgnConveyor from 'mgn-conveyor';

Constructor

new mgnConveyor( element [, option] )
Argument Data type Default Descroption
element String -(Required) Specify target element.
ex) ".j-conveyor"
option Object - ex)
option = {
speed: 500
}
Option Data type Default Descroption
speed Number 300 Specify speed (ms).

Property

Property Data type Default Descroption
flag Boolean false

Demo

https://frontend-isobar-jp.github.io/mgn-conveyor/

import mgnConveyor from 'mgn-conveyor';

let conveyor = new mgnConveyor(".j-conveyor");

let btn = document.getElementById('btn');

btn.onclick = () => {
    conveyor.flag ? conveyor.Stop() : conveyor.Start();
}

Package Sidebar

Install

npm i mgn-conveyor

Weekly Downloads

1

Version

0.0.0

License

MIT

Unpacked Size

7.58 kB

Total Files

4

Last publish

Collaborators

  • frontend-isobar-jp