fix imagewow function
This commit is contained in:
+17
-20
@@ -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];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user