Pjax only deals with the content enclosed between its [[begin()]] and [[end()]] calls, called the *body content* of the widget.
By default, any link click or form submission (for those forms with data-pjax attribute) within the body content
will trigger an AJAX request. In responding to the AJAX request, Pjax will send the updated body content (based
on the AJAX request) to the client which will replace the old content with the new one. The browser's URL will then
be updated using pushState. The whole process requires no reloading of the layout or resources (js, css).
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 GridView widget so that the grid pagination,
sorting and filtering can be done via pjax:
php
use yii\widgets\Pjax;
Pjax::begin();
echo GridView::widget([...]);
Pjax::end();