你如何调用JavaScript(AJAX)功能,当用户到达一个页面的最后加载新的内容?加载、页面、功能、内容

2023-09-11 00:53:36 作者:鱼刺.

在微博(新的Twitter)和Facebook,他们现在有加载新的鸣叫和职位的能力,当你点击页面底部。

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..

有一个JavaScript / jQuery的事件,您可以调用/添加到一个div所以当浏览器撞击它做了一些AJAX调用来获取新的数据底部?

Is there a JavaScript / jQuery event that you can call / add to a div so when the browser hits the bottom it does some ajax call to get the new data?

感谢

丹尼尔

推荐答案

有一个jQuery插件为:的无限滚动jQuery插件。

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.