I was hoping there was a pure CSS solution, but that code is pretty concise.
So if I just attach this to the onReady for the page, it’ll happen once when the page renders, right? If I want it to work when they also resize the window, should I also attach it to the window.onresize event?
Also, one thing I noticed was that as you scroll, the “photo1″ and “photo2″ text seem to remain stationary on the page, while everything else scrolls.
This is on Chrome on OSX.
Is that normal behaviour?
When I was using actual photographs, I noticed weird scrolling as well – the content would scroll up/down, but the background image seemed to remain where it was, if that makes any sense.