Add default switches to Pjax.switches (#92)

Fixes #68 and reverts #74
This commit was merged in pull request #92.
This commit is contained in:
BehindTheMath authored and Maxime Thirouin committed 2017-12-19 13:49:26 +01:00
1 parent 352e7114b6
commit 75eddfcab6
2 files changed
+5 -1

No files matched your search

+1 -1
View File
@@ -248,7 +248,7 @@ with or without [WOW.js](https://github.com/matthieua/WOW).
new Pjax({
selectors: ["title", ".js-Pjax"],
switches: {
".js-Pjax": require("pjax/lib/switches.js").sideBySide
".js-Pjax": Pjax.switches.sideBySide
},
switchesOptions: {
".js-Pjax": {
+4
View File
@@ -9,6 +9,8 @@ var on = require("./lib/events/on.js")
// var off = require("./lib/events/on.js")
var trigger = require("./lib/events/trigger.js")
var defaultSwitches = require("./lib/switches")
var Pjax = function(options) {
this.firstrun = true
@@ -42,6 +44,8 @@ var Pjax = function(options) {
}.bind(this))
}
Pjax.switches = defaultSwitches
Pjax.prototype = {
log: require("./lib/proto/log.js"),