Live data from Hacker News

Just Scroll

www2.nissan.co.jp

1–10 of 109 posts

Re: Just Scroll

#6

Anyone care to explain how this works? It can't just be an endless array of divs, can it?

viewing the source seems to indicate that it is, in fact, just an endless array of divs.

(disclaimer: I don't actually know any html, just how to click 'view source' in Chrome)

Re: Just Scroll

#7

Anyone care to explain how this works? It can't just be an endless array of divs, can it?

Sort of.

There is an endless array of divs which is absolutely positioned, ie:

The actual scrolling is performed by a 'dummy' div, has the same overflow. Some javascript will be listening to scroll events on this div, and updating the position of the above div.

This is typically done as scrolling 'floating' images on most browsers isn't smooth, & to 'jump' the scroll the correct amount to achieve the effect.

Re: Just Scroll

#10
post #6

Anyone care to explain how this works? It can't just be an endless array of divs, can it?

viewing the source seems to indicate that it is, in fact, just an endless array of divs. (disclaimer: I don't actually know any html, just how to click 'view source' in Chrome)

"I don't actually know any html, just how to click 'view source' in Chrome"

That's a bit strange for someone that visits hacker news!

Post reply on HN