A timer plugin for jQuery
Latest commit 86f281f Jan 10, 2014 @jbrooksuk Added GitTip
Failed to load latest commit information.
README.md Added GitTip Jan 10, 2014
jquery.timer.js Added pause and resume methods. Jun 28, 2013
timer.jquery.json Added pause and resume methods. Jun 28, 2013


jQuery Timer Plugin Gittip

A simple and effective way of handling JavaScript internals using jQuery. Version 1.0.0

Creating a new timer

Timers are created with an easy to remember syntax.

var timer = $.timer(timeout, callback, disabled);
  • timeout is the time to set the interval to run at, in milliseconds.
  • callback can be either a reference to another function, or an anonymous function.
  • disabled if set to true, the timer is created inactive, needs a .reset() to trigger first. Optional.

Timer methods

In the chance that you need to stop or reset your timer, you can use the following two methods:

  • .stop()
  • .reset([timeout])
  • .pause()
  • .resume()

The timeout option for reset is optional, as it'll use the default internal option reset.



MIT - http://jbrooksuk.mit-license.org