javascript – Scroll box by box

I want the function I need to scroll by displaying box by box with the same class and not as it normally does by moving the scroll, regardless of the box it displays.