jquery countdown remain seconds
Reverse countdown timer show remaining seconds.
11 seconds remaining
var counter = 15; var intervalId = null; function action() { //clearInterval(intervalId); document.getElementById("bip-log").innerHTML = "THE END!" + counter; } function bip() { document.getElementById("bip").innerHTML = counter + " seconds remaining"; counter--; if (counter == 0) { counter = 15; } } function start() { intervalId = window.setInterval(bip, 1000); window.setInterval(action, counter * 1000); //setTimeout(action, counter * 1000); } start()DEMO
jquery countdown remain seconds
Reviewed by Bhaumik Patel
on
8:27 PM
Rating: