Skip to content

renjithspace/timers.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Timers.js

Pure JavaScript timer plugin

Installation

NPM

npm install timers.js --save

In Node.js

require('timers.js')

Direct download from latest releases

Usage

Include

<script src="dist/js/timers.js"></script>

Initialize

new Timer();

Configuration

new Timer({
    // Options here
    property: value,
    ...
});

Options

Property Description Available values Default value
el Timer.js element Element selector (string) '.timer'
time.second Set initial second integer 0
time.minute Set initial minute integer 0
time.hour Set initial hour integer 0
isStoped Set timer status boolean false

Methods

Method Description
.get('second|minute|hour') Get the current time
.set('second|minute|hour', value) Set time
.pause() Pause the timer
.stop() Stop the timer
.resume() Resume the timer

About

Pure JavaScript timer plugin

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors