Hi. Help me please.
If I use
let mm = gsap.matchMedia();
mm.add("(min-width: 600px)", () => {
if (ScrollTrigger.isTouch === 0) {
let smoother = ScrollSmoother.create({
content: "#content",
smooth: 1,
ignoreMobileResize: true,
effects: true
});
}
return () => {
const wrapper = document.querySelector('.ScrollSmoother-wrapper');
wrapper.outerHTML = wrapper.innerHTML;
}
});
// menu button
if (!$('body').hasClass('menu-open')) {
smoother.paused(true);
} else {
smoother.paused(false);
}
$('body').toggleClass('menu-open');
// Error
Uncaught TypeError: smoother is undefined