php - IasPager pager not working after ajax update on clistview -
yii infinite scroll extention: "iaspager pager" not working after ajax update on clistveiw. it's working fine before ajax call after ajax call when update listview it's not working.
$this->widget('zii.widgets.clistview', array( 'id' => 'videolist', 'dataprovider' => $dataprovider, 'itemview' => '_view', 'template' => '{items} {pager}', 'pager' => array( 'class' => 'ext.infinitescroll.iaspager', 'rowselector'=>'.row', 'listviewid' => 'videolist', 'header' => '', 'loadertext'=>'loading...', 'options' => array('history' => false, 'triggerpagetreshold' => 2, 'trigger'=>'load more'), ) ) );
i have found solution of this, works fine.
<?php $this->widget('zii.widgets.clistview', array( 'dataprovider'=>$dataprovider, 'itemview'=>'/products/viewproductlist', 'summarytext'=>false, 'emptytext'=>"<p> coming soon!!</p>", 'id'=>'ajaxproductlistview', 'cssfile'=>yii::app()->baseurl.'/css/mycustom.css', 'template' => '{items} {pager}', 'ajaxupdate'=>true, 'pager' => array( 'class' => 'ext.infinitescroll.iaspager', 'rowselector'=>'.ademo', 'listviewid' => 'ajaxproductlistview', 'header' => '', 'loadertext'=>'loading', 'options' => array('history' => false, 'triggerpagetreshold' => 1, 'trigger'=>'load more'), ), 'afterajaxupdate'=>"function(id, data) { $.ias({ 'history': false, 'triggerpagetreshold': 1, 'trigger': 'load more', 'container': '#ajaxproductlistview', 'item': '.ademo', 'pagination': '#ajaxproductlistview .pager', 'next': '#ajaxproductlistview .next:not(.disabled):not(.hidden) a', 'loader': 'loading...' }); }", ));?>
Comments
Post a Comment