rewrite this code for a countdown timer on squarespace to take off the seconds portion…
- User
rewrite this code for a countdown timer on squarespace to take off the seconds portion of the timer.
"#countdown{color:#fff; display:inline-block; text-align:center; font-size:1.5rem} #countdown>div{padding:10px; background:#283d57; display:inline-block} #countdown div>span{padding: 5px; display:inline-block} Days Hours Minutes Seconds var deadline=new Date("May 31, 2023 23:59:59").getTime();var x=setInterval(function(){var now=new Date().getTime();var t=deadline-now; var days=Math.floor(t/(1000606024)); var hours=Math.floor((t%(1000606024))/(10006060)); var minutes=Math.floor((t%(10006060))/(100060)); var seconds=Math.floor((t%(100060))/1000); document.getElementById("day").innerHTML=days; document.getElementById("hour").innerHTML=hours; document.getElementById("minute").innerHTML=minutes; document.getElementById("second").innerHTML=seconds;if(t<0) {clearInterval(x);document.getElementById("timer").innerHTML="TIME UP";document.getElementById("day").innerHTML='0'; document.getElementById("hour").innerHTML='0'; document.getElementById("minute").innerHTML='0'; document.getElementById("second").innerHTML='0'}},1000); "
- Assistant