当用户到达页面末端以加载新内容时,如何调用JavaScript (AJAX)函数?

时间:2022-08-25 23:23:57

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

在twitter(新的twitter)和facebook上,当你点击页面底部时,他们现在可以加载新的tweet和帖子。

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?

是否有可以调用/添加到div的JavaScript / jQuery事件,当浏览器到达底部时,它会进行一些ajax调用来获取新的数据?

Thanks

谢谢

Daniel

丹尼尔

3 个解决方案

#1


5  

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

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

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

下面是它实现的模式的描述:交互设计模式。

#2


1  

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

它叫做无限滚动,这里有一个jQuery插件:http://www.infinite-scroll.com/

#3


1  

It's called "Lazy Loading"

它被称为“延迟加载”

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

jquery插件:http://www.appelsiini.net/projects/lazyload

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

实际上有很多插件:http://www.google.com/search?

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

google搜索惰性加载将帮助您加载:)http://www.google.com/search?

#1


5  

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

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

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

下面是它实现的模式的描述:交互设计模式。

#2


1  

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

它叫做无限滚动,这里有一个jQuery插件:http://www.infinite-scroll.com/

#3


1  

It's called "Lazy Loading"

它被称为“延迟加载”

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

jquery插件:http://www.appelsiini.net/projects/lazyload

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

实际上有很多插件:http://www.google.com/search?

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

google搜索惰性加载将帮助您加载:)http://www.google.com/search?