Skip to content

Commit

Permalink
embed fix
Browse files Browse the repository at this point in the history
  • Loading branch information
desafinadude committed Dec 3, 2024
1 parent 10c8c9c commit e6b1f09
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions script2.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,29 +208,29 @@ document.addEventListener('DOMContentLoaded', function () {

// END SCROLLY. UNSTICK

ScrollTrigger.create({
trigger: '.scrolly-section[data-section-label="end"]',
start: () => {
const backgroundRect = background.getBoundingClientRect();
return `top ${offsetInPixels}px`;
},
onEnter: () => {

gsap.to('.scrolly-background', {
position: 'relative',
duration: 0.5,
ease: 'power1.inOut'
});
},
onLeaveBack: () => {

gsap.to('.scrolly-background', {
position: 'sticky',
duration: 0.5,
ease: 'power1.inOut'
});
}
});
// ScrollTrigger.create({
// trigger: '.scrolly-section[data-section-label="end"]',
// start: () => {
// const backgroundRect = background.getBoundingClientRect();
// return `top ${offsetInPixels}px`;
// },
// onEnter: () => {

// gsap.to('.scrolly-background', {
// position: 'relative',
// duration: 0.5,
// ease: 'power1.inOut'
// });
// },
// onLeaveBack: () => {

// gsap.to('.scrolly-background', {
// position: 'sticky',
// duration: 0.5,
// ease: 'power1.inOut'
// });
// }
// });

// SCROLLY CAPTIONS FADE INS

Expand Down

0 comments on commit e6b1f09

Please sign in to comment.