There are some single page applications where a user can carry on vertically scrolling -- but the page looks paused and scrolls horizontally - and then clears a section.
- https://color-of-the-year.com/
- https://highline.huffingtonpost.com/articles/en/poor-millennials/
- https://ascc.bornfight.com/
- https://kubrick.life/clockwork11/
I am unsure though how they do this -- I've seen transform styles being applied but not really sure what happens to the elements that would have been there naturally if the user were to scroll normally.
I've added the jquery wayward function to detect when a nested spread is displayed.
Something like this:
Here is the HTML fragment. Slide 1 is a full page element, as is slide 5 and 6. These could be anchors to a menu. The behavior I am interested in creating here - is as the user approaches the nested unit - it locks at the top of slide 2, then transforms slides 3 and 4.
$win.on('scroll', function() {
var top = $win.scrollTop() / 3;
console.log("top", top);
$nested.css('transform', 'translate(' + -top + 'px, 0)');
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="section">slide 1</div>
<div class="nested">
<div class="section first">slide 2</div>
<div class="section second">slide 3</div>
<div class="section third">slide 4</div>
</div>
<div class="section">slide 5</div>
<div class="section">slide 6</div>