Currently, I am in the process of developing a personal website that features numerous expandable items. My goal is to restrict the page scrolling to the height of the expanded item once it is opened. I do not want users to be able to scroll above or below the expanded section. I have already attempted using scroll(0, yPosition) to achieve this effect when the current scroll position is out of bounds, but the result is quite stuttering... Any suggestions on how to accomplish this smoothly?
Appreciate any help in advance!