Scroll to top after Pagination in CListView

Hi guys,

Hopefully somebody can point me in the right direction here. When using a default pagination widget, my “posts” page is updated using AJAX, but the page doesn’t scroll to the top. The result is rather unsightly—the results change but the viewer is stuck halfway down the page. You can even see this problem in the default “blog” example. How does one alleviate this problem? Without AJAX it works fine, obviously. Here is my code:

$this->widget('zii.widgets.CListView', array(








I would like to know as well

I use the following to configure the widget




but it is not working

ahh, sorted,


                js: window.scrollTo(0,0)