const cardsRef = useRef(null);
useEffect(() => {
const cards = Array.from(cardsRef.current.children);
const timeline = gsap.timeline({ defaults: { duration: 3 } });
gsap.set(cards, { opacity: 0, x: 500 });
cards.forEach((card) => {
gsap.to(card, {
x: 0,
opacity: 1,
duration: 1,
ease: "ease-in-out",
scrollTrigger: {
trigger: card,
start: "top 60%",
end: "+=400",
scrub: true,
},
});
});
}, []);
Here is the code I am working with Next.js the the start market is going above the element and when we inspect the element it comes to the place
first image is without inspect when first page load notice markers
when we inspect the marker comes in place why it is happening please help
this is my first post apologies for any if the post is not according to guidelines