fix: progress bar animations

This commit is contained in:
Karma Riuk 2023-09-02 17:10:48 +02:00
parent b17729e9c0
commit f1a0f407bd

View File

@ -175,17 +175,19 @@
/** /**
* Skills animation * Skills animation
*/ */
let skilsContent = select(".skills-content"); let skillsContent = select(".skills-content .progress", true);
if (skilsContent) { if (skillsContent) {
new Waypoint({ skillsContent.forEach((skill) => {
element: skilsContent, new Waypoint({
offset: "80%", element: skill,
handler: function(direction) { offset: "100%",
let progress = select(".progress .progress-bar", true); handler: function(direction) {
progress.forEach((el) => { let progress = skill.querySelectorAll(".progress-bar");
el.style.width = el.getAttribute("aria-valuenow") + "%"; progress.forEach((el) => {
}); el.style.width = el.getAttribute("aria-valuenow") + "%";
}, });
},
});
}); });
} }