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