Issue
I programmed an alarm clock as my first Web-project. Now I want, that my RemainingTime "clock" starts blinking and changing color after every 15 minutes for 1 minute. I found some code in the internet but that doesnt work for me :/ I started the funktion blinking() with checking if the minutes/15 is an integer value. Thanks for helping me :)
function blinking()
{
remainingMinutes = Math.floor(pDateTime.getTime() - new Date().getTime()) / 60000;
remainingMinutesf = Math.ceil(remainingMinutes % 60).toString().padStart(2, "0");
console.log(remainingMinutesf);
if(Number.isInteger(remainingMinutesf/15))
{
var BlinkingClock = document.getElementById("Remainclock");
setInterval(function()
{
},1000)
}
}
#RemainClock {
font-family: 'Orbitron', sans-serif;
font-size: 5vw;
background-image: linear-gradient(180deg,
rgba(99,253,136,1) 0%,
rgba(51,197,142,1) 50%,
rgba(39,97,116,1) 100%);
background-clip: text;
-webkit-background-clip: text;
-moz-background-clip: text;
-webkit-text-fill-color: transparent;
-moz-text-fill-color: transparent;
}
Solution
function blinking()
{
var BlinkingClock = document.getElementById("RemainClock");
BlinkingClock.style.color = "red";
BlinkingClock.style.visibility = (BlinkingClock.style.visibility == "hidden" ? "" : "hidden");
}
Answered By - Argaros
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.