-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
33 lines (23 loc) · 986 Bytes
/
script.js
File metadata and controls
33 lines (23 loc) · 986 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 items = document.querySelectorAll(".item");
items.forEach((item) => {
const x = item.querySelector(".title");
const y = item.querySelector(".content");
x.addEventListener("click", () => {
item.classList.toggle("active");
});
});
// -------------------------------------Main Bar --------------------------------------
let circularProgress = document.querySelector(".circular-progress"),
progressValue = document.querySelector(".progress-value");
let progressStartValue = 0,
progressEndValue = 25,
speed = 100;
let progress = setInterval(() => {
progressStartValue++;
progressValue.textContent = `${progressStartValue}%`
circularProgress.style.background = `conic-gradient(rgba(0, 128, 0, 0.747) ${progressStartValue * 3.6}deg, #ededed 0deg)`
if(progressStartValue == progressEndValue){
clearInterval(progress);
}
}, speed);
// -------------------------------------------------------------------