diff --git a/example/example.js b/example/example.js index f52f8bf..594b3a5 100644 --- a/example/example.js +++ b/example/example.js @@ -20,7 +20,8 @@ document.addEventListener("pjax:success", function() { document.addEventListener("DOMContentLoaded", function() { var pjax = new Pjax({ elements: [".js-Pjax"], - selectors: [".body"] + selectors: [".body", "title"], + cacheBust: true, // currentUrlFullReload: true, }) console.log("Pjax initialized.", pjax) diff --git a/example/forms.html b/example/forms.html new file mode 100644 index 0000000..eee4469 --- /dev/null +++ b/example/forms.html @@ -0,0 +1,138 @@ + + + + + Forms + + + + +
+

Forms

+ Hello. Try out the examples below and inspect the results in your browser's developer tools, or go to the Index. + +

GET form

+ +
+ + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ +
+ + + + + +
+ +
+
+ + + + +
+
+ + + + +
+
+ + +
+ +
+
+ +

POST form

+ +
+ + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ +
+ + + + + +
+ +
+
+ + + + +
+
+ + + + +
+
+ + +
+
+ + diff --git a/example/index.html b/example/index.html index f9e3da5..2245d5b 100644 --- a/example/index.html +++ b/example/index.html @@ -1,17 +1,22 @@ - + Hello - - + + -
+

Index

Hello. - Go to Page 2 or Page 3 and view your console to see Pjax events. - Clicking on this page will just reload the page entirely. + Go to Page 2 or Page 3 and view your console to see Pjax events. + Clicking on this page will just reload the page entirely. + +

Forms

+ + You can submit GET or POST forms with Pjax! Go to the form examples to try it out. +
diff --git a/example/page2.html b/example/page2.html index 36d2e33..7d0b941 100644 --- a/example/page2.html +++ b/example/page2.html @@ -1,15 +1,15 @@ - - Hello - - + + Page 2 + + -
+

Page 2

- Hello. Go to Index. + Hello. Go to Index.
diff --git a/example/page3.html b/example/page3.html index 7546dd1..9864eb6 100644 --- a/example/page3.html +++ b/example/page3.html @@ -1,15 +1,15 @@ - - Hello - - + + Page 3 + + -
+

Page 3

- Hello. Go to Index. + Hello. Go to Index.