Snap to page during scroll

Any ideas on how I could implement page-snapping functionality, similar to that on phones where when you swipe a page left or right it snaps to the previous/next page if >50% of the current page has moved.

swipe