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
2017-12-19 07:49:26 -05:00
committed by Maxime Thirouin
parent 352e7114b6
commit 75eddfcab6
2 changed files with 5 additions and 1 deletions

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": {

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"),