diff --git a/framework/assets/pjax/jquery.pjax.js b/framework/assets/pjax/jquery.pjax.js index 10ec9fd0ca..7e6e642b2c 100644 --- a/framework/assets/pjax/jquery.pjax.js +++ b/framework/assets/pjax/jquery.pjax.js @@ -44,6 +44,8 @@ // event - "click" jQuery.Event // options - pjax options // +// If the click event target has 'data-pjax="0"' attribute, the event is ignored, and no pjax call is made. +// // Examples // // $(document).on('click', 'a', $.pjax.click) diff --git a/framework/widgets/Pjax.php b/framework/widgets/Pjax.php index 1d7046c895..825a4acd9e 100644 --- a/framework/widgets/Pjax.php +++ b/framework/widgets/Pjax.php @@ -25,6 +25,8 @@ use yii\web\Response; * You may configure [[linkSelector]] to specify which links should trigger pjax, and configure [[formSelector]] * to specify which form submission may trigger pjax. * + * You may disable pjax for a specific link inside the container by adding `data-pjax="0"` attribute to this link. + * * The following example shows how to use Pjax with the [[\yii\gridview\GridView]] widget so that the grid pagination, * sorting and filtering can be done via pjax: *