使用AJAX(jQuery的)装日期格内无限滚动 [英] Infinite scrolling inside a div with AJAX (jQuery) loaded date

查看:90
本文介绍了使用AJAX(jQuery的)装日期格内无限滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在试图找出这个在几个问题在这里对SO,找出不同的部分,然后把它们组装,但现在我放弃了。

I've been trying to figure this out over several questions here on SO, finding out the different parts and then assembling them, but now I'm giving up.

我试图做这样:

该用户在网页上,点击一个按钮和内容加载的列表将使用jQuerys阿贾克斯一个div。当他或她滚动到div的底部,加载更多的内容。可以看出在Twitter上,但是这是一个div里面。

The user is on a page, clicks a button and a list of content loads into a div using jQuerys .ajax. When he or she scrolls to the bottom of the div, load more content. As seen on Twitter, but this is inside a div.

我已经看到了如何有无限加载在滚动的例子,但问题是,这些例子重新加载整个页面(似乎)

I've seen examples on how to have infinite loading in scroll, but the problem is that those examples reload the entire page (it seems)

有没有人有任何想法如何,我可以做到这一点?

Has anyone got any idea how I can accomplish this?

至于说,我不能这样用正常的手段实现。

As said, I cannot accomplish this using normal means.

该网页是建立如下:

1,有一个div,空,直到用户点击一个按钮。

Page 1, has a div, empty until the user clicks a button.

第2页加载了很多内容。当用户点击按钮页面1上,这被装入的div

Page 2 loads a lot of content. When the user clicks on the button on page 1, this is loaded into the div.

在通过DIV用户滚动(它已溢出设置为自动),并在div的底端应该加载下一个页面或者可以这么说。

When the user scrolls through the div (It has overflow set to auto) and ends at the bottom of the div it should load the next page or so to speak.

在此先感谢! :)

推荐答案

有一些插件它为你这样做很好。

There are some plugins which do this for you quite well.

<一个href="http://www.webdeveloperjuice.com/2010/02/24/create-infinte-scroll-effect-using-jquery-with-demo/">http://www.webdeveloperjuice.com/2010/02/24/create-infinte-scroll-effect-using-jquery-with-demo/

<一个href="http://www.beyondcoding.com/2009/01/15/release-jquery-plugin-endless-scroll/">http://www.beyondcoding.com/2009/01/15/release-jquery-plugin-endless-scroll/

编辑:一些更多的最新插件:

<一个href="https://github.com/fredwu/jquery-endless-scroll">https://github.com/fredwu/jquery-endless-scroll

<一个href="http://www.infinite-scroll.com/infinite-scroll-jquery-plugin/">http://www.infinite-scroll.com/infinite-scroll-jquery-plugin/

这篇关于使用AJAX(jQuery的)装日期格内无限滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆