-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
33 lines (30 loc) · 1.11 KB
/
app.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
function iskrographIn(event) {
var segment = event.target;
var rating = segment.getAttribute("data-rating");
var ratingCellId = segment.parentElement.getAttribute("data-rating-cell");
var ratingCell = document.getElementById(ratingCellId);
if (rating < 83) {
segment.classList.add("low-bold");
ratingCell.classList.add("red-text");
} else {
segment.classList.add("normal-bold");
}
ratingCell.parentElement.classList.add("hide");
ratingCell.classList.add("week-rating-show");
ratingCell.textContent = rating;
};
function iskrographOut(event) {
var segment = event.target;
var rating = segment.getAttribute("data-rating");
var ratingCellId = segment.parentElement.getAttribute("data-rating-cell");
var ratingCell = document.getElementById(ratingCellId);
if (rating < 83) {
segment.classList.remove("low-bold");
ratingCell.classList.remove("red-text");
} else {
segment.classList.remove("normal-bold");
}
ratingCell.parentElement.classList.remove("hide");
ratingCell.classList.remove("week-rating-show");
ratingCell.textContent = "";
};