Bing image search paging - infinite scroll

ajax, bing, image, pagination, scroll

Solution

Here's an article about that technology :

Eliminate paging results by using JavaScript (ala DZone) : Using Javascript, prototype and PHP.

Problem

When you search for images on the Bing search engine, the result is displayed like this: http://www.bing.com/images/search?q=stack+overflow Notice how you can keep scrolling and scrolling and there is not "normal" paging. My question is: How do they do this? I can see there is some ajax/javascript events happening, but the code is not easy to read. I especially would like to know how they know when an "empty box" is inside the users view port.

Original source