title: Yii2 pjax is working only the first time
body: <p>I am using pjax with Yii2 and I have faced a problem with pjax.
  All scripts are working correctly and fine only the first time and after sending a pjax request and updating the table content, scripts and pjax not working. If I remove the line <code>$.pjax.reload({container:'#products-table'});</code> all scripts are working. And also I found this solution ( <a href="https://stackoverflow.com/questions/29524980/yii2-pjax-and-activeform-beforesubmit-not-working-after-reload">Yii2 Pjax and ActiveForm beforeSubmit not working after reload?</a> ): " <code>$(document).on('ready pjax:success', function(){ // to do });</code> " and with it working fine BUT after adding more jquery code it stopped working again. Please if someone has the same issue please share with solution. Thanks!</p>
  
  <pre><code>$(document).on('ready pjax:success', function(){
  
      $(".product-edit-submit").on('click', function(){
              $.ajax({
                  type : "POST",
                  url : editUrl,
                  data: {
                      id: this.id,
                      productName: productName,
                      productCost: productCost,
                      _csrf: csfr
                  },
                  success  : function(response) {
                      $.pjax.reload({container:'#products-table'});
                  },
                  error : function(response){
                      console.log(response);
                  }
              });
              return false;
  
          });
      });
  </code></pre>
  
  <h1>VIEW :</h1>
  
  <pre><code>&lt;?php Pjax::begin(['id' =&gt; 'products-table']); ?&gt;
          &lt;table class="table table-hover table-striped"&gt;
          .......
          &lt;/table&gt;
  &lt;?php Pjax::end(); ?&gt;
  </code></pre>