Just enabled
PJAX
and ran into issues. SomeJS
functions, despite having thedata-pjax
attribute, still didn’t reload. This problem appeared in a user-customizedJS
function for calculating reading time.
1// Original function
2aaaaaaaaaaaaaaa;
3// Current function
4function pjax_reload() {
5 aaaaaaaaaaaaaaa;
6}
7document.addEventListener("pjax:complete", function () {
8 pjax_reload(); // Reload the above function after Pjax completes
9});