-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
33 lines (31 loc) · 829 Bytes
/
Copy pathscript.js
File metadata and controls
33 lines (31 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
const images = [
"./images/vapor-image-1.gif",
"./images/vapor-image-2.gif",
"./images/vapor-image-3.gif",
"./images/vapor-image-4.gif",
"./images/vapor-image-5.gif",
"./images/vapor-image-6.webp"
];
$(document).ready(function () {
let current = 0;
$("#mirror-content").on("click", function () {
$(this).css({
"background-image": `url(${images[++current % images.length]})`
});
});
});
let fullscreen;
let fsEnter = document.getElementById('fullscr');
fsEnter.addEventListener('click', function (e) {
e.preventDefault();
if (!fullscreen) {
fullscreen = true;
document.documentElement.requestFullscreen();
fsEnter.innerHTML = "Exit Fullscreen";
}
else {
fullscreen = false;
document.exitFullscreen();
fsEnter.innerHTML = "Go Fullscreen";
}
});