title: Disable pjax loading on certain buttons inside Pjax container (Yii2)
body: <p>I need to disable pjax inside pjax container on some anchor tags like cancel/ back button. Below is my code:</p>
  
  <pre><code>Pjax::begin(['id' =&gt; 'pjax-container-pac-form','timeout' =&gt; 10000, 'enablePushState' =&gt; false]);
  $form = ActiveForm::begin([
  'options' =&gt; [
      'id' =&gt; 'create-pac-form',
      'data-pjax' =&gt; true
  ]
  ]);
  echo Html::a(Yii::t('app','Cancel'), ['/agency'], ['class' =&gt; 'btn btn-default', 'id' =&gt; 'cancelButton', 'data-pjax' =&gt; false]);
  ActiveForm::end();
  Pjax::end();
  </code></pre>
  
  <p>I tried to add <code>'data-pjax' =&gt; false</code> on anchor tag but it's not working. Although it's redirecing back to specified url but at first it's trying to hit via ajax and after that it redirects back to the link. I would like to disable ajax here and redirect it back to the url being specified. I can do so by moving the cancel button out of pjax container but I'm looking for some better way of doing it without modifying HTML at all.</p>