npm

class-looper

1.0.0 • Public • Published

Class Looper

Apply a class to an element, and have it that class periodically move through an array of elements.

Installation

NPM

npm i class-looper

Yarn

yarn add class-looper

Bower

bower install class-looper

Usage

$('slider-container slider-slide').classLooper({ ... });

Options

Setting Type Default Description
fullduration string or integer null Define the duration of the entire loop, instead of an individual loop duration. If this is set, the duration setting will be ignored.
duration integer 2 Set the length of time a single loop should last (in seconds).
first string or integer current entry ID Define what number element the loop will start form.
delay integer or boolean false Set a delay (in seconds) for when the initial loop should begin.
loop integer infinite Set the amount of times to loop through the array of elements
reverse boolean false Setting this to true will reverse the direction of the loop
class string 'current' Choose what class name should be applied to the currently looping element.

Readme

Keywords

none

Package Sidebar

Install

npm i class-looper

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • marknotton