I’m cloning this web site https://www.lifeatspotify.com/ and I’m about 90% carried out, however I’m having bother with the second part “folder flips”. I’ve made the heading stack on one another however when the third heading stacks on prime all of the hyperlinks ought to change to place relative.
I’ve this code up to now:
const folderLinks = doc.querySelectorAll(".folder-flip-link");
window.addEventListener("scroll", () => {
if (folderLinks[folderLinks.length - 1].getBoundingClientRect().prime <= 112) {
folderLinks.forEach((hyperlink) => {
hyperlink.type.place = "relative";
});
}
});
However I do not know tips on how to get the highest place like https://www.lifeatspotify.com/
Does anybody have an thought?
Herr is a brief video of the issue: https://drive.google.com/file/d/1MoyMbsbAbH5uQYHbxVoOrEcnvAZWXLcx/view?usp=drivesdk