fix imagewow function

This commit is contained in:
2026-10-01 20:36:54 -04:00
parent 99c9ccf77d
commit d9e1cef279
+17 -20
View File
@@ -285,27 +285,24 @@ jQuery(function($) {
document.documentElement.scrollTop = 0; // webkit document.documentElement.scrollTop = 0; // webkit
} }
function imagewow() { function imagewow() {
var imlocation = "assets/img/maymay/"; const images = [
"dimanche.png",
"lundi.png",
"mardi.png",
"mercredi.png",
"jeudi.jpg",
"vendredi.jpg",
"samedi.jpg"
];
function ImageArray(n) { const day = new Date().getDay();
this.length = n;
for (var i = 1; i <= n; i++) { document.getElementById("meme").src =
this[i] = ' ' "assets/img/maymay/" + images[day];
} }
}
image = new ImageArray(7); imagewow();
image[0] = 'dimanche.png';
image[1] = 'lundi.png';
image[2] = 'mardi.png';
image[3] = 'mercredi.png';
image[4] = 'jeudi.jpg';
image[5] = 'vendredi.jpg';
image[6] = 'samedi.jpg';
var currentdate = new Date();
var imagenumber = currentdate.getDay();
document.getElementById("meme").src = imlocation + image[imagenumber];
}