I want a certain logo to show up during a month. I tried the following but it never worked. One is a gif and the other is a PNG.
Javascript:
var logo = document.getElementById("logo");
const refreshStatus = () => {
// Get dates/time/hours
let today = new Date(); //today date
//Show available if this matches
if (today.getMonth == 5) {
logo.src='../../img/logo2.gif';
} else {
logo.src='../../img/logo.png';
}
}
// run when starting
refreshStatus();
// updates every 8 seconds
setInterval(refreshStatus, 8000);
HTML:
<a href="../index.html" class="index-link"><img src="../img/logo.png" alt="Logo" class="logo" id="logo"></a>
<script src="js/pride.js"></script>