I'm creating a homepage that includes animations. Inside a div, I initially have display: none
, but I want it to change to display: block
after a few seconds. I've been trying to use JavaScript for this purpose, but I'm struggling to find the right timer script.
The goal is to modify my CSS after a set period of time. Here's the code I've come up with so far:
var myVar = setInterval(myTimer, 1000);
function myTimer() {
document.getElementsByClassName("logindiv").style.display = "block";
}
With that said, what would be the best way to adjust my CSS using a timer?