-
Notifications
You must be signed in to change notification settings - Fork 0
/
changeSource.js
91 lines (89 loc) · 2.32 KB
/
changeSource.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
(function() {
let medium = {
jamesVP: {
name: "James van Praagh",
age: "60",
books: [
"Ghosts Among Us",
"Reaching to Heaven",
"Healing grief",
"Looking Beyond",
"Talking to heaven",
"Heaven and Earth",
"Meditations with James Van Praagh",
"Tuning Into: Intuition/Abundance"
],
tv: [],
networth: "200.6 miljoen",
slogan: "Rijkste medium op het moment",
audio: ""
},
johnE: {
name: " John Edward",
age: "49",
books: [
"infinite quest",
"After Life",
"One Last time",
"Fallen Masters",
"Crossing Over",
"Practical Praying",
"Final Beginnings",
"Developing Your own Psychic Powers",
"What If God Were the SUN"
],
tv: [
"Crossing Over with John Edward",
"John Edward Cross Country",
"EVOLVE (internet show)"
],
networth: "3 miljoen",
slogan: "Koudste lezer die er is",
audio: ""
},
missC: {
name: " Miss Cleo",
age: "overleden",
books: ["Miss cleo Tarot power deck"],
tv: [
"Miss Cleo",
"Miss Cleo psychic advise",
"Miss Cleo tarot power",
"Mind and spirit"
],
networth: "1 miljoen",
slogan: "Geboren in Los Angeles maar net uit Jamaica?",
audio: ""
},
hollywoodM: {
name: "Tyler Henry",
age: "22",
books: ["Between Two Worlds: Lessons from the other side"],
tv: ["Hollywood medium"],
networth: "3 miljoen",
slogan: "Glamour medium ontmaskert",
audio: ""
}
};
let changeSRC = {
init() {
let allItems = document.querySelector(".thecards").children;
let infoPlace = document.querySelector(".info-med");
let htmlValues = Object.values(allItems);
htmlValues.forEach(i => {
i.addEventListener("mouseover", event => {
console.log(event.target.classList[0]);
let targetName = event.target.classList[0];
let rightMedium = medium[`${targetName}`];
infoPlace.innerHTML = `
<ul>
<li> ${rightMedium.name}</li>
<li><strong> ${rightMedium.slogan}</strong></li>
</ul>
`;
});
});
}
};
changeSRC.init();
})();