Alex Rivera | Logout

Auto load content on scroll down

Asked 2012-10-15T17:18:59.110
8

I am creating a blog on django/webfaction. My hompage currently displays 4 posts by default (posts are limited to 4 on queryset in urls.py). Now I would like to load four more posts once user reaches the bottom of the page and keep on continuing that until last post is reached. How to achieve this?

Edit
Report

1 Answer

1

You can make Ajax call to fetch more posts on 'onscroll' event of element (possibly on body in your case). You can make the same call using jquery's '.scroll()' documented here: http://api.jquery.com/scroll/

You can probably maintain a previous-top statement to determine direction of current scroll.

answered 2012-10-15T17:39:58.550

Your Answer