hi every one
i have a problem
in this page
https://peyrovifurniture.com/product-category/collections/
its my code
const commonScrollTriggerConfig = {
start: 'top top',
end: '+=200%',
scrub: 1,
pin: true,
markers: true
};
// Define animations for multiple elements
const elementSelectors = Array.from({ length: 50 }, (_, i) => `.collectionz-wrap-${i + 1}`);
elementSelectors.forEach((elementSelector) => {
gsap.to(elementSelector, {
scrollTrigger: {
trigger: elementSelector,
...commonScrollTriggerConfig,
},
});
});
now i want to add class to ".collection-thumbs li" while scrolling and "$elementSelector" is pinned
* number of ".collection-thumbs li" can be different as you can see in the link above
** i want to divide scrolling time equally between ".collection-thumbs" children