Yesterday I was told to create an element on a page that grew as the user scrolled down.
NOOOOOOOOOOOOOOOOOOOOOOOOOOO
was my first thought. Although difficult, finally I made it happen. This is how I done it:
The page had a bunch of margin at the bottom, as the user scrolls down the page sucks up the slack, and shoves it at the top, keeping the elements in place as the user scrolls down.
The only problem is the screen was all wobbily as the user scrolls because off all the work the javascript had to do to keep it all together.
This was a fix to make it smoother by adding a pusher element that pushes everything down and changing the content to a fixed positioning. Once the content is fully opened and closed, the content switches to relative positioning.
The main problem was that when you scrolled back up the scrolling got messed up.
This was the best solution, the content simply stays fixed and the javascript copies over the scrolling data to the top: css element after the scroll down is fully down,
Finally I’m commiting and then done for tonight.
It’s amazing how tired I am.
next