Skip to content

Commit 9f0a0ed

Browse files
Merge branch 'inview-ede' into 4.0.0
2 parents 5ed938b + c924232 commit 9f0a0ed

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

lib/shortcuts/inview.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ https://github.com/imakewebthings/waypoints/blog/master/licenses.txt
7979
}
8080
}(config)),
8181
offset: config.offset,
82-
horizontal: this.options.horizontal
82+
horizontal: this.options.horizontal,
83+
enabled: this.options.enabled
8384
}))
8485
}
8586

@@ -90,6 +91,18 @@ https://github.com/imakewebthings/waypoints/blog/master/licenses.txt
9091
}
9192
this.waypoints = []
9293
}
94+
95+
Inview.prototype.disable = function() {
96+
for (var i = 0, end = this.waypoints.length; i < end; i++) {
97+
this.waypoints[i].disable()
98+
}
99+
}
100+
101+
Inview.prototype.enable = function() {
102+
for (var i = 0, end = this.waypoints.length; i < end; i++) {
103+
this.waypoints[i].enable()
104+
}
105+
}
93106

94107
Inview.defaults = {
95108
enter: noop,

lib/shortcuts/inview.min.js

Lines changed: 1 addition & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)