Auto-Scrollabe Page's Content

Hello Yii-Users :)

I want to build a web page which have a feature for autoscroll the page's content.

It's, as far the user uses the scroll, then the page will automatically adds new content to the page.

Something like

Is in Yii a component which allows to do this?

Otherwise, Do you know a third-party library/plugin to do this?

Thanks in advance.

Looking the source of that site, it is done by jQuery such as,

(1) jQuery.scroll if scroll condition is met (e.g. scroll bar getting low); load flag = true;

(2) jQuery.ajax (get the data from the host) if load flag = true;

You may do the same using only jQuery, I think.

Hope this helps :)

I do something similar, perhaps you can use this (in the view):

<div id='commentLoader'></div>


	$(document).ready(function() {

		var lastcomment;

		function commentFunc()


			if (lastcomment != $(".comments:last").attr("id")){

				$('div#commentLoader').html('<img src="/assets/img/loading.gif">');


					mode: "abort",

					// limit abortion to this input

					port: "comments",

					url: "/vote/next/"+$(".comments:last").attr("id"),

					data: '',



						if (data != "End reached..") {







			lastcomment = $(".comments:last").attr("id");



			if ($('div#commentLoader').offset()) {

				if ($(window).scrollTop() > $('div#commentLoader').offset()['top'] - 450){







Be sure to use ajaxqueue. When the Ajax request sends a "End reached…" I clear the commentLoader div, so it stops sending requests.