diff --git a/app/assets/javascripts/jquery.infinite-pages.js.coffee b/app/assets/javascripts/jquery.infinite-pages.js.coffee index 351e045..af8b7ca 100644 --- a/app/assets/javascripts/jquery.infinite-pages.js.coffee +++ b/app/assets/javascripts/jquery.infinite-pages.js.coffee @@ -62,7 +62,7 @@ Released under the MIT License # load event if close enough check: -> nav = @$container.find(@options.navSelector) - if nav.size() == 0 + if (if typeof nav.size == 'function' then nav.size() else nav.length) == 0 @_log "No more pages to load" else windowBottom = @$context.scrollTop() + @$context.height()