JSFiddle - React, Tailwind, and code Playground
by GreenMonster
HTML
<div id="timer">10</div>
<div id="down">
download
</div>
CSS
#down {
display: none;
}
JavaScript
function timer(){
var obj=document.getElementById('timer');
obj.innerHTML--;
if(obj.innerHTML==0){
document.getElementById('timer').style.display = "none";
document.getElementById('down').style.display = "block";
setTimeout(function(){},1000);
}
else{setTimeout(timer,1000);}
}
setTimeout(timer,1000);