0

Basically i have a full screen website that you scroll through content through links to anchors.

What i want to be able to do is for the page to automatically scroll to the top of an anchor when the user scrolls away from it with mouse wheel or scroll bar, this is so the viewer of the site will never have half of one box of content showing and half of the other.

Example:

http://nationallgbtmuseum.org/#/home/

When they scroll away from one bit of content the page will automatically scroll it back to the top of the section.

I hope this makes sense, any help would be great.

2 Answers2

0

What you're looking for sounds like you're after is what is described in this question: Snap To Top of Div/Element on Scroll

You could also look at these questions:

Community
  • 1
  • 1
Bernie
  • 1,485
  • 1
  • 16
  • 27
0

I found a solution, pretty obvious one, a jquery plugin named "windows" automatically scrolls to top of DIV most in view when using full page divs:

http://nick-jonas.github.io/windows/