A
A
alysenko2016-12-21 15:25:54
Yii
alysenko, 2016-12-21 15:25:54

How to follow a pjax wrapped link without updating the block?

In a YII2 project, I use PJAX to update a block. Accordingly, there are links when you click on which this block is updated.
But there are links that lead to other pages. But, when you click on these links, first the page is reloaded, and then only follows the link.
As I understand it, PJAX works first, and then only following the link.
How to solve this problem? So that when you click on certain links, PJAX is ignored and the transition to the desired page is immediately made

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
alysenko, 2016-12-21
@alysenko

I found the solution myself. I wrote the question longer than I was looking for)
Insert the parameter "'data-pjax' => '0'" into the link properties

I
ivanitch, 2019-11-28
@amurcoder

// Применяем обработчик Pjax только к этим ссылкам
'linkSelector'=>'.pagination a',

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question