This timer is able to show the countdown time and executes a funcion callback on timeout.
1. Create a new Timer object by passing the timeout time in seconds, a callback function to execute when timer finished and a HTML element to show the timer somewhere.
var test = new Timer( <seconds>, <callback_function>, <HTML_element>);
test.run();
Micha Meier
- Function callback on timeout
- Shows countdown time
Have a look at Plunker: https://embed.plnkr.co/XKePzB/