diff --git a/index.js b/index.js index bc68870..db41466 100644 --- a/index.js +++ b/index.js @@ -51,7 +51,7 @@ Pjax.prototype = { }, switchSelectors: function(selectors, fromEl, toEl, options) { - return require("./lib/switch-selectors.js")(this.options.switches, this.options.switchesOptions, selectors, fromEl, toEl, options) + return require("./lib/switches-selectors.js")(this.options.switches, this.options.switchesOptions, selectors, fromEl, toEl, options) }, // too much problem with the code below @@ -209,6 +209,9 @@ Pjax.prototype = { } } +Pjax.isSupported = require("./lib/is-supported.js"); + +//arguably could do `if( require("./lib/is-supported.js")()) {` but that might be a little to simple if (Pjax.isSupported()) { module.exports = Pjax } diff --git a/lib/proto/parse-dom.js b/lib/proto/parse-dom.js index e9dfb64..626dc2f 100644 --- a/lib/proto/parse-dom.js +++ b/lib/proto/parse-dom.js @@ -1,6 +1,6 @@ var forEachEls = require("../foreach-els") -var parseElement = require("../parse-element") +var parseElement = require("./parse-element") module.exports = function(el) { forEachEls(this.getElements(el), parseElement, this) diff --git a/lib/switches.js b/lib/switches.js index 56a91b6..9f5fcec 100644 --- a/lib/switches.js +++ b/lib/switches.js @@ -1,4 +1,4 @@ -var on = require("./lib/events/on.js") +var on = require("./events/on.js") // var off = require("./lib/events/on.js") // var trigger = require("./lib/events/trigger.js")