开发者

How do you call a JavaScript (AJAX) function when the user reaches the end of a page to load new content?

On twitter (new twitter) and facebook they now have the the ability to load new tweets and posts when you hit the bottom of the page..

Is there a JavaScript / jQuery event that you can call / add t开发者_高级运维o a div so when the browser hits the bottom it does some ajax call to get the new data?

Thanks

Daniel


There's a jQuery plugin for that: Infinite Scroll jQuery Plugin.

And here's the description of the pattern that it implements: The Interaction Design Pattern.


It's called Infinite Scrolling, and there's a jQuery plugin for it here: http://www.infinite-scroll.com/


It's called "Lazy Loading"

a plugin for jquery: http://www.appelsiini.net/projects/lazyload

in fact there are many plugins: http://www.google.com/search?q=lazy+loading+jquery

googling for Lazy Loading will help you a load :) http://www.google.com/search?q=lazy+loading

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜