Hi, I'm new here. Just started digging into this GSAP world, quite amazed so far!!
I found this NextJS site I really liked, and I've been trying to replicate it with Wordpress.
I've added the gsap libraries and it works on other sections, but don't know why, when I use heights in % in my CSS, gsap won't animate them.
If i change the css to height 1500px, it works.
CSS:
.circle {
height: 1550%;
width: 120%;
left: -10%;
border-radius: 0 0 50% 50%;
background-color: #e4ff07;
position: absolute;
box-shadow: 0 60px 50px rgba(0,0,0,.748);
}
Script is:
// SLIDING IMAGES
const container = document.getElementById('slidingImages');
const circle = container.querySelector('.circle');
gsap.to(circle, {
scrollTrigger: {
trigger: container,
start: 'top bottom',
end: 'bottom top',
scrub: true,
markers: true
},
height: 0,
});
It should be happening here: https://tasks.talkk.com.au/ (above the blog section).
Reference is https://blog.olivierlarose.com/demos/awwwards-landing-page
Hope you could guide me on how to fix it Thanks!