JSFiddle - React, Tailwind, and code Playground
HTML
<div id="countdown"></div>
<p>This is my page. Yay. For demo purposes I'm starting the countdown at 15 so that you don't have to wait a whole minute.</p>
JavaScript
$(document).ready(function() {
function doCountdown(time, cb) {
$("#countdown").text(time);
if (time === 0)
cb();
else
setTimeout(function() {
doCountdown(time-1, cb);
}, 1000);
}
doCountdown(15, updateEntry);
function updateEntry() {
alert("This is updateEntry()");
}
});