开发者

Load more results like on facebook/twitter

Maybe you've seen on Facebook/Twitter this effect. I want to load more results and append them to the existent ones. No problem so far. How can I keep track of how many results I have yet, to know from where on to query next time?

I have a number of answers:

  1. Wrap the results into a div with an id, results1, results 2 ...and then get the last id and multiply it by ho开发者_如何学Gow many results are in a container

  2. Keep the number in a variable, reset it every time the list is requested after you come from another page.


Take a look at this.

It worked fine for me.

http://youhack.me/2010/05/14/an-alternative-to-pagination-facebook-and-twitter-style/

I'm just posting a link rather than an answer, because you can go through the code and will be able to solve the problem by yourself.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜