I'm getting the error below when using this Pjax in simple html project.
The pages are created with BootstrapStudio (mockup). Pjax has been linked from CDN.
I added listeners on pjax:send and pjax:complete
document.addEventListener('pjax:send', $appContainer.startLoading()); document.addEventListener('pjax:complete', $appContainer.stopLoading());
Called functions will just add/remove class .loading to/from body.
Hi!
I'm getting the error below when using this Pjax in simple html project. The pages are created with BootstrapStudio (mockup). Pjax has been linked from CDN.
I added listeners on pjax:send and pjax:complete
document.addEventListener('pjax:send', $appContainer.startLoading()); document.addEventListener('pjax:complete', $appContainer.stopLoading());
Called functions will just add/remove class.loading
to/frombody
.Seems like the events do trigger on page load.
When I click a link, pjax:send triggers:
TypeError: Property 'handleEvent' is not callable.pjax.js:419:10 exports https://cdn.jsdelivr.net/npm/pjax/pjax.js:419 exports https://cdn.jsdelivr.net/npm/pjax/pjax.js:459 exports https://cdn.jsdelivr.net/npm/pjax/pjax.js:411 forEach self-hosted:235 exports https://cdn.jsdelivr.net/npm/pjax/pjax.js:400 loadUrl https://cdn.jsdelivr.net/npm/pjax/pjax.js:186 linkAction https://cdn.jsdelivr.net/npm/pjax/pjax.js:718 exports https://cdn.jsdelivr.net/npm/pjax/pjax.js:769
pjax:complete triggers:
TypeError: Property 'handleEvent' is not callable.pjax.js:419:10 exports https://cdn.jsdelivr.net/npm/pjax/pjax.js:419 exports https://cdn.jsdelivr.net/npm/pjax/pjax.js:459 exports https://cdn.jsdelivr.net/npm/pjax/pjax.js:411 forEach self-hosted:235 exports https://cdn.jsdelivr.net/npm/pjax/pjax.js:400 afterAllSwitches https://cdn.jsdelivr.net/npm/pjax/pjax.js:252 onSwitch https://cdn.jsdelivr.net/npm/pjax/pjax.js:116 outerHTML https://cdn.jsdelivr.net/npm/pjax/pjax.js:1048 bind_applyFunctionN self-hosted:1054 outerHTML self-hosted:1018 exports https://cdn.jsdelivr.net/npm/pjax/pjax.js:1038 forEach self-hosted:235 exports https://cdn.jsdelivr.net/npm/pjax/pjax.js:1037