Hi there,
Still finding my way with GSAP and very slowly watching a ton of videos and trying new things out.
Using Oxygen on a dev site, we have two effects where the background color changes as you scroll, this in two sections.
Essentially two separate effects in one code block, as below.
The issue, it works fine however I do see an error and can't for the life of me work out why.
Any advice would be gratefully received regarding the error or the code I am using.
Many thanks.
ReferenceError: gsap is not defined on line #2
jQuery(document).ready( function() {
gsap.registerPlugin(ScrollTrigger);
gsap.to("#section-2-107", {
scrollTrigger: {
trigger: "#section-2-107",
start: "10% 100%",
end: "45% 60%",
toggleClass: "bg-change-2a"
}
});
gsap.to("change",{
scrollTrigger: {
trigger: "#section-2-107",
start: "10% 100%",
end: "45% 60%",
toggleClass: "black"
}
});
gsap.to("#section-1813-107", {
scrollTrigger: {
trigger: "#section-1813-107",
start: "10% 11%",
end: "88% 90%",
toggleClass: "bg-change-2a"
}
});
gsap.to("change",{
scrollTrigger: {
trigger: "#section-1813-107",
start: "10% 11%",
end: "88% 90%",
toggleClass: "black"
}
});
})