i'm a new Yii 2 develpoer ! i create a gridview like below :
<?php Pjax::begin()?>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\ActionColumn'],
'id',
'countrydate',
'countryName'=>[
'attribute'=>'countryName',
'content' => function($model,$key,$index,$column) {
return Html::a(
'<div data-role="main" class="ui-content">'
.'<a href="#myPopup'.$key.'" data-rel="popup" class="ui-btn ui-btn-inline ui-corner-all">'
.'<span id="countryNamevalue'.$key.'">'.$model->countryName.'</span>'
.'</a>'
.'<div data-role="popup" id="myPopup'.$key.'" class="ui-content">'
.'<h2 id="a'.$key.'">enter the new data</h2>'
.'<input id="myinput'.$key.'" type="text" >'
.'<button onclick=showcountryCode(myinput'.$key.'.value,'.$key.') >Submit</button>'
.'</div>'
.'</div>'
,null
,$options = [
'id'=>'countryCode'.$key,
'style'=>['border'=>'none' , 'background'=>'none'],
]);
}
],
'countryName',
'countrydate',
'population',
'fipsCode',
],
]); ?>
<?php Pjax::end()?>
as you can see i use jQuery Mobile in My php file in 'countryName'
.
now this picture is my website Pic
but when i change the page my page will be somthing like this : enter image description here
as you can see all of the jQuery MObile line that were hidden suddenly show block in the new page and i have to refresh the page to fix this !!!
can anybody tell me what should i do to fix this ?