diff --git a/README.md b/README.md index 2e6cf08..6b706c9 100644 --- a/README.md +++ b/README.md @@ -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": { diff --git a/index.js b/index.js index e628021..b7f7b3b 100644 --- a/index.js +++ b/index.js @@ -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"),