I am trying to figure out if the following scenario is possible with simple jQuery or javascript, without the use of a plugin.
Here is the base example code:
<div id="section1">
<!-- content here -->
</div>
<div id="section2">
<!-- content here -->
</div>
<div id="section3">
<!-- content here -->
</div>
Each section will fill the viewport in both width and height. What I would like to achieve, is when the viewer scrolls down or up, regardless of the length of the scroll, to simply transition to the next section. I don't want there to be typical scrolling, only transitions to the next or previous section.
I know that I can to this with buttons really easily, and would like to extend this to scrolling. I was checking out a great example of this the other day, but I cannot for the life of me find that page.
I had thought perhaps using a variable to store which section the viewer is currently in, and cycling depending on the direction, but I'm not sure if that is the best approach or even how to get started with that.
Please let me know if I have explained the concept clearly. I would greatly appreciate any thoughts on this.
Thanks!