-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjsIndex.js
103 lines (86 loc) · 2.98 KB
/
jsIndex.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
alert("Welcome to our java script project ^_<")
// function myFunction() {
// var indexBtoon = document.getElementsByClassName("indexBtnn");
// var b;
// for (b = 0; b < indexBtoon.length; b++) {
// indexBtoon[b].style.color = "Blue";
// }
// }
var img1 = document.getElementsByClassName("img1");
img1[0].addEventListener("mouseover",function () {
img1[0].style.transform="rotate(80deg)";
})
img1[0].addEventListener("mouseout",function () {
img1[0].style.transform="rotate(0deg)";
})
var img1 = document.getElementsByClassName("img1");
img1[1].addEventListener("mouseover",function () {
img1[1].style.transform="rotate(-80deg)";
})
img1[1].addEventListener("mouseout",function () {
img1[1].style.transform="rotate(0deg)";
})
img1[2].addEventListener("mouseover",function () {
img1[2].style.transform="rotate(50deg)";
})
img1[2].addEventListener("mouseout",function () {
img1[2].style.transform="rotate(0deg)";
})
img1[3].addEventListener("mouseover",function () {
img1[3].style.transform="rotate(-50deg)";
})
img1[3].addEventListener("mouseout",function () {
img1[3].style.transform="rotate(0deg)";
})
var indexHead = document.getElementsByTagName('h2');
indexHead[0].addEventListener("mouseout", function () {
indexHead[0].style.color = "#FFFF00";
});
indexHead[0].addEventListener("mousemove", function () {
indexHead[0].style.color = "black";
indexHead[0].style.cursor = "pointer"
});
indexHead[1].addEventListener("mouseout", function () {
indexHead[1].style.color = "#FFFF00";
});
indexHead[1].addEventListener("mousemove", function () {
indexHead[1].style.color = "black";
indexHead[1].style.cursor = "pointer"
});
indexHead[2].addEventListener("mouseout", function () {
indexHead[2].style.color = "#FFFF00";
});
indexHead[2].addEventListener("mousemove", function () {
indexHead[2].style.color = "black";
indexHead[2].style.cursor = "pointer"
});
indexHead[3].addEventListener("mouseout", function () {
indexHead[3].style.color = "#FFFF00";
});
indexHead[3].addEventListener("mousemove", function () {
indexHead[3].style.color = "black";
indexHead[3].style.cursor = "pointer"
});
var indexF = document.getElementById("indexPar");
indexF.onmousemove = function () {
document.getElementById("indexPar").style.color = "#CBA2Ce";
}
var indexH = document.getElementById("indexPaar");
indexH.onmousemove = function () {
document.getElementById("indexPaar").style.color = "#ADD8E6";
}
var indexK = document.getElementById("indexPaaar");
indexK.onmousemove = function () {
document.getElementById("indexPaaar").style.color = "#ffc58f";
}
var indexL = document.getElementById("indexPaaaar");
indexL.onmousemove = function () {
document.getElementById("indexPaaaar").style.color = "#8ffffd";
var element = document.getElementById('home');
element.addEventListener("mouseover", function () {
element.innerHTML = "Hello kids";
});
element.addEventListener("mouseout", function () {
element.innerHTML = " Home";
});
}