There is a function, and you need to turn it off with a screen width of less than 1080 pixels, and turn on with a width of more than 1080 pixels. This code did not help me:
var screenWidth = document.documentElement.clientWidth; if (screenWidth <= 1080 ) { window.onscroll = false; } else if(screenWidth > 1080 { window.onscroll = true; } still tried to write such code to define the key variable
var picInd = scrolled <= 1 && screenWidth >= 1080 ? 0 : scrolled > 8 && screenWidth >= 1080 ? 9 : scrolled; but also did not help.