Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A tiny jQuery plugin for adding pauses between cycles in .each() loops
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README.md
UNLICENSE.md
jquery.eachpause.js

README.md

EachPause for jQuery

EachPause is a tiny jQuery plugin that you use the same way as .each() except it takes a second millisecond parameter to be used as a delay between each cycle.

But why?

Say, for example, you’re cycling through a list of images, displaying one at a time (i.e., a slideshow) and you want to wait 5 seconds on each image before moving on to the next one.

Usage

First, make sure to include jquery.eachpause.js...

<script type="text/javascript" src="jquery.eachpause.js"></script>

Then, in your jQuery, just do something like...

$('.selector').eachPause(5000, function() {
  // Do whatever would normally go in .each() here.
});
Something went wrong with that request. Please try again.