Skip to content

jrf0110/active-interval

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 

jQuery Active Class Rotator

Applies an active class to a set of elements one at a time at a specific interval.

Usage

var savingsInterval = $('.my-sayings > li').activeInterval({
  interval: 3000
}).start();

Install

bower install jquery.active-rotator

Documentation

Options:

// Defaults
{
  // Time between each tick
  interval:       5000
  // Class name to use for active element
, className:      'active'
  // Class name to use for the next active element
, upNext:         'up-next'
  // Before the class change occurs
, onTickBefore:   function( interval ){}
  // As the class change occurs
, onRotate:       function( $el, interval ){}
};

The plugin returns an interface for handling the rotation.

start()

Starts the interval.

stop()

Stops the interval.

go( index )

Go to a specific position

next()

Got to the previous position

prev()

Got to the next position

About

Applies an `active` class to a set of elements one at a time at a specific interval.

Resources

Stars

Watchers

Forks

Packages

No packages published