-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
50 lines (30 loc) · 922 Bytes
/
script.js
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
const target = document.getElementById("target");
function moveTarget() {
const maxWidth = 500;
const maxHeight = 500;
const randomX = Math.floor(Math.random() * maxWidth);
const randomY = Math.floor(Math.random() * maxHeight);
target.style.left = randomX + "px";
target.style.top = randomY + "px";
}
// function changeVideo3() {
// }
target.addEventListener("mouseenter", function () {
moveTarget();
var video = document.getElementById('bgVideo');
video.src = "./videos/no_no_no_video.mp4";
video.load();
});
function changeVideo() {
var video = document.getElementById('bgVideo');
video.src = "./videos/yes_video.mp4";
video.load();
}
function changeVideo2() {
var video = document.getElementById('bgVideo');
video.src = "./videos/Thankyou_video.mp4";
video.load();
}
// yes.addEventListener("click", () => {
// alerlt("Thank you😍 I love you too💓😁");
// });