fixed some require paths also added isSupported include to index.js
This commit is contained in:
5
index.js
5
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
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user