* Fix check for radio and checkbox inputs * Fix GET form submission * Add example forms for testing * Refactor query string building
29 lines
749 B
JavaScript
29 lines
749 B
JavaScript
/* global Pjax */
|
|
console.log("Document initialized:", window.location.href)
|
|
|
|
document.addEventListener("pjax:send", function() {
|
|
console.log("Event: pjax:send", arguments)
|
|
})
|
|
|
|
document.addEventListener("pjax:complete", function() {
|
|
console.log("Event: pjax:complete", arguments)
|
|
})
|
|
|
|
document.addEventListener("pjax:error", function() {
|
|
console.log("Event: pjax:error", arguments)
|
|
})
|
|
|
|
document.addEventListener("pjax:success", function() {
|
|
console.log("Event: pjax:success", arguments)
|
|
})
|
|
|
|
document.addEventListener("DOMContentLoaded", function() {
|
|
var pjax = new Pjax({
|
|
elements: [".js-Pjax"],
|
|
selectors: [".body", "title"],
|
|
cacheBust: true,
|
|
// currentUrlFullReload: true,
|
|
})
|
|
console.log("Pjax initialized.", pjax)
|
|
})
|