We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents be2bb67 + 251298e commit 49c5774Copy full SHA for 49c5774
src/jquery-ias.js
@@ -354,9 +354,15 @@
354
* @public
355
*/
356
IAS.prototype.initialize = function() {
357
- var currentScrollOffset = this.getCurrentScrollOffset(this.$scrollContainer),
+ var supportsOnScroll = (!!('onscroll' in this.$scrollContainer.get(0))),
358
+ currentScrollOffset = this.getCurrentScrollOffset(this.$scrollContainer),
359
scrollThreshold = this.getScrollThreshold();
360
361
+ // bail out when the browser doesn't support the scroll event
362
+ if (!supportsOnScroll) {
363
+ return false;
364
+ }
365
+
366
this.hidePagination();
367
this.bind();
368
0 commit comments