<?php Pjax::begin([
'id' => 'select_pjax'
])?>
<?= GridView::widget([
'dataProvider' => $dataProviderTemp,
'columns' => [
......]])
<?php
$this->registerJs(
'$("document").ready(function(){
setTimeout(function(){
$.pjax.reload({container:"#select_pjax"}); //Reload GridView
},5000);
});'
);?>
<?php Pjax::end()?>
код всякий разный
<?php Pjax::begin([
'id' => 'save_pjax'
])?>
<?= GridView::widget([
'dataProvider' => $dataProviderTemp,
'columns' => [
......]])
<?php
$this->registerJs(
'$("document").ready(function(){
setTimeout(function(){
$.pjax.reload("#save_pjax"); //Reload GridView
},4000);
});'
);?>
<?php Pjax::end()?>
$.pjax.reload('#pjax-container', options);
$.pjax.reload('#pjax-container2', options);
$.ajax({
'success': function(data){
var targets = [
'#container1',
'#container2'
];
$.each(targets, function (ind, t) {
$(t).html($(data).find(t).html());
});
}
});
$.pjax.reload({container: "#container1", async:false});
$.pjax.reload({container: "#container2", async:false});