使用AJAX(jQuery的)装日期格内无限滚动日期、AJAX、jQuery

由网友(别跟我磨叽)分享简介:我一直在试图找出这个在几个问题在这里对SO,找出不同的部分,然后把它们组装,但现在我放弃了。I've been trying to figure this out over several questions here on SO, finding out the different parts and then a...

我一直在试图找出这个在几个问题在这里对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.

http://www.webdeveloperjuice.com/2010/02/24/create-infinte-scroll-effect-using-jquery-with-demo/

http://www.beyondcoding.com/2009/01/15/release-jquery-plugin-endless-scroll/

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

https://github.com/fredwu/jquery-endless-scroll

http://www.infinite-scroll.com/infinite-scroll-jquery-plugin/

阅读全文

相关推荐

最新文章