fix imagewow function
This commit is contained in:
+17
-20
@@ -285,27 +285,24 @@ jQuery(function($) {
|
||||
document.documentElement.scrollTop = 0; // webkit
|
||||
}
|
||||
|
||||
function imagewow() {
|
||||
var imlocation = "assets/img/maymay/";
|
||||
function imagewow() {
|
||||
const images = [
|
||||
"dimanche.png",
|
||||
"lundi.png",
|
||||
"mardi.png",
|
||||
"mercredi.png",
|
||||
"jeudi.jpg",
|
||||
"vendredi.jpg",
|
||||
"samedi.jpg"
|
||||
];
|
||||
|
||||
function ImageArray(n) {
|
||||
this.length = n;
|
||||
for (var i = 1; i <= n; i++) {
|
||||
this[i] = ' '
|
||||
}
|
||||
}
|
||||
image = new ImageArray(7);
|
||||
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];
|
||||
}
|
||||
const day = new Date().getDay();
|
||||
|
||||
document.getElementById("meme").src =
|
||||
"assets/img/maymay/" + images[day];
|
||||
}
|
||||
|
||||
imagewow();
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user