title: Custom buttons Action Column, yii2
body: <p>I want to change default buttons on ActionColumn (GridView::widget) using modal popup window. here is my code:</p>
  
  <pre><code>            ['class' =&gt; 'yii\grid\ActionColumn',
              'contentOptions' =&gt; ['style' =&gt; 'width: 8.7%'],
              'visible'=&gt; Yii::$app-&gt;user-&gt;isGuest ? false : true,
              'buttons'=&gt;[
                  'view'=&gt;function ($url, $model) {
                      $t = 'index.php?r=site/view&amp;id='.$model-&gt;id;
                      return Html::button('&lt;span class="glyphicon glyphicon-eye-open"&gt;&lt;/span&gt;', ['value'=&gt;Url::to($t), 'class' =&gt; 'btn btn-default btn-xs', 'id'=&gt;'modalButtonView']);
                  },
                  'update'=&gt;function ($url, $model) {
                      $t = 'index.php?r=site/update&amp;id='.$model-&gt;id;
                      return Html::button('&lt;span class="glyphicon glyphicon-pencil"&gt;&lt;/span&gt;', ['value'=&gt;Url::to($t), 'class' =&gt; 'btn btn-default btn-xs', 'id'=&gt;'modalButtonView']);
                  },
              ],
          ],
  </code></pre>
  
  <p>Only first button works well, another buttons doesn't. What should I change? And can I use anchor tags instead buttons?
  Here are my js and ModalWidget:</p>
  
  <pre><code>$(function(){
  $('#modalButtonView').click(function(){
      $('#modalView').modal('show').find('#modalContentView').load($(this).attr('value'));
  
  });});
  
  
          Modal::begin(['id'=&gt;'modalView', 'size'=&gt;'modal-md']);
      echo "&lt;div id='modalContentView'&gt;&lt;/div&gt;";
      Modal::end();
  </code></pre>