- Last post
- 3 Responses
Working on something with nice full page scrolling in mind, and wondering how you can have content within one of the scrolling sections that is taller than the viewport.
Consider this scenario:
Section 1 - content within fits within the viewport. Initiating scroll brings you to Section 2 and it snaps into place.
Section 2 - content is taller than the viewport, and should scroll freely within it until you're at the end, then it should scroll to Section 3, and it snaps into place.
Section 3 - could do either treatment from section 1 or section 2.
Basically the general function of the example below, but with the capability I described in section 2.
check viewport height on load:
do scenario 1
if doesn't fits
do scenario 2
also in wp you can tie these js functions without php to specific pages by observing the body class and building functions on that...