Skip to content

Commit

Permalink
Merge pull request #149 from fieg/no-opera-mini
Browse files Browse the repository at this point in the history
added scroll event detection and bail out when unsupported (fixes #146)
  • Loading branch information
fieg committed Jan 16, 2015
2 parents be2bb67 + 251298e commit 49c5774
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/jquery-ias.js
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,15 @@
* @public
*/
IAS.prototype.initialize = function() {
var currentScrollOffset = this.getCurrentScrollOffset(this.$scrollContainer),
var supportsOnScroll = (!!('onscroll' in this.$scrollContainer.get(0))),
currentScrollOffset = this.getCurrentScrollOffset(this.$scrollContainer),
scrollThreshold = this.getScrollThreshold();

// bail out when the browser doesn't support the scroll event
if (!supportsOnScroll) {
return false;
}

this.hidePagination();
this.bind();

Expand Down

0 comments on commit 49c5774

Please sign in to comment.