Pie Timing Plugin for jQuery
JavaScript
Switch branches/tags
Nothing to show
Pull request Compare This branch is 23 commits behind knorthfield:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README
index.html
jquery.pietimer.js

README

Pietimer injects a canvas element into the page which has an ever reducing pie shaped timer. Once the timer is complete a callback function is performed.


Usage
======

The pietimer canvas element will be injected *into* the specified element.



$('#element').pietimer(); // Will place pietimer inside #element
$('#element').pietimer('start');

At any point you can pause it.
$('#element').pietimer('pause');

And restart it.
$('#element').pietimer('start');

And when stopped you can start it again!



Don't forget to pass some options and a callback!




Options
=======

$('#element').pietimer({
	seconds: 5,
	colour: 'rgba(255, 255, 255, 0.8)',
	height: 40,
	width: 40
},
function(){
	alert('boom');
});


height and width will be inherited from the parent element and so are optional.

colour will accept any value that the canvas element accepts including hex values like ffffff