Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jbrooksuk/jquery-timer-plugin
A timer plugin for jQuery
https://github.com/jbrooksuk/jquery-timer-plugin
Last synced: about 12 hours ago
JSON representation
A timer plugin for jQuery
- Host: GitHub
- URL: https://github.com/jbrooksuk/jquery-timer-plugin
- Owner: jbrooksuk
- Created: 2010-09-11T20:47:05.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2023-07-04T10:02:38.000Z (over 1 year ago)
- Last Synced: 2024-05-02T00:19:21.825Z (5 months ago)
- Language: HTML
- Homepage: https://james-brooks.uk
- Size: 150 KB
- Stars: 37
- Watchers: 6
- Forks: 31
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jQuery Timer Plugin
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.```js
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`.
# Contributors
- James Brooks [@jbrooksuk](http://github.com/jbrooksuk) - [http://james.brooks.page](http://james.brooks.page)
- [@gaboom](http://github.com/gaboom) - [http://gablog.eu/](http://gablog.eu/)# License
MIT - [http://jbrooksuk.mit-license.org](http://jbrooksuk.mit-license.org)