$(document).offset() crashes on jquery 3.0
v1.18.x
barisusakli 9 years ago
parent cb940fec28
commit 532a543226

@ -13,10 +13,10 @@ define('forum/infinitescroll', function() {
scroll.init = function(el, cb) { scroll.init = function(el, cb) {
if (typeof el === 'function') { if (typeof el === 'function') {
callback = el; callback = el;
container = $(document); container = $('body');
} else { } else {
callback = cb; callback = cb;
container = el || $(document); container = el || $('body');
} }
$(window).off('scroll', onScroll).on('scroll', onScroll); $(window).off('scroll', onScroll).on('scroll', onScroll);

Loading…
Cancel
Save