Asynchronous switch functions (Make sure the DOM is parsed after switching) (#79)

* Make sure the DOM is parsed after switching

* Fix reload-link in the example
This commit was merged in pull request #79.
This commit is contained in:
Oskar
2017-12-19 13:58:22 +01:00
committed by Maxime Thirouin
parent 1e40a0d70b
commit be5d58d550
4 changed files with 5 additions and 3 deletions

View File

@@ -19,7 +19,8 @@ document.addEventListener("pjax:success", function() {
document.addEventListener("DOMContentLoaded", function() {
var pjax = new Pjax({
selectors: [".body"],
elements: [".js-Pjax"],
selectors: [".body"]
// currentUrlFullReload: true,
})
console.log("Pjax initialized.", pjax)