I am trying to find a way to do this. I have a list of boxes, each about 150px tall. I use javascript (and jquery) and I want that after the user scrolls down the page, the page will automatically scroll so that the fields match the rest of the page (that is, if the user scrolls and the y position of the page is not divided by 150, it will scroll to the nearest point).
Now, for now, I know that I can .scroll() event using the .scroll() jquery event, and I can make it jump to a specific point using .scrollTop() . But every pixel that the user moves with the scroll bar activates the whole function. So is there a way to delay the function from firing until the user scrolls, and if they start to scroll again, will the function stop?
javascript jquery user-interface scroll
DavidR Nov 27 2018-10-11T00: 00-11
source share