Pietimer

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.

Download from GitHub


Demo

Start Timer

Pause Timer

Boom!

The timer finished.

Usage

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

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

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

Options

	$('#demo').pietimer({
	    seconds: 10,
	    color: 'rgba(0, 0, 0, 0.8)',
	    height: 100,
	    width: 100
	}, function(){
	    //Do something ...
	});
	$('#demo').pietimer('start');
	

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