//
//add class when scrolled
function addClassWhenScrolled(target, classname = "show", scrollamount = 100) {
console.log(l51.prototype.getScrollAmount());
const target_elms = document.getElementsByClassName(target);
//loop through target
if (l51.prototype.getScrollAmount() > scrollamount) {
for (let i = 0; i < target_elms.length; i++) {
//add class
if (!target_elms[i].classList.contains(classname)) {
target_elms[i].classList.add(classname);
target_elms[i].classList.remove("hide");
}
}
} else {
//remove class
for (let i = 0; i < target_elms.length; i++) {
target_elms[i].classList.remove(classname);
target_elms[i].classList.add("hide");
}
}
}