Fix reload-link in the example

This commit is contained in:
Oskar Rough
2016-11-15 23:08:05 +01:00
parent ebc7fa462c
commit 1a72905c62
3 changed files with 4 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)

View File

@@ -10,7 +10,7 @@
<div class='body'>
<h1>Index</h1>
Hello.
Go to <a href='page2.html'>Page 2</a> and view your console to see Pjax events.
Go to <a href='page2.html' class="js-Pjax">Page 2</a> and view your console to see Pjax events.
Clicking on <a href='index.html'>this page</a> will just reload the page entierly.
</div>
</body>

View File

@@ -9,7 +9,7 @@
<body>
<div class='body'>
<h1>Page 2</h1>
Hello. Go to <a href='index.html'>Index</a>.
Hello. Go to <a href='index.html' class="js-Pjax">Index</a>.
</div>
</body>
</html>