Closed carlosdubus closed 11 years ago
Hi!
IE8 returns 'medium' instead of a number for css('borderTopWidth') when no border is set... that makes _observe fail working.
So I changed _observe to this:
function _observe() { var $inner = $e.find('div.jscroll-inner').first(), borderTopWidth = parseInt($e.css('borderTopWidth')), borderTopWidthInt = isNaN(borderTopWidth) ? 0 : borderTopWidth data = $e.data('jscroll'), iContainerTop = parseInt($e.css('paddingTop')) + borderTopWidthInt, iTopHeight = isWindow ? $scroll.scrollTop() : $e.offset().top, innerTop = $inner.length ? $inner.offset().top : 0, iTotalHeight = Math.ceil(iTopHeight - innerTop + _$scroll.height() + iContainerTop), nextHref = $.trim(data.nextHref + ' ' + _options.contentSelector);
if (_checkNextHref(data) && !data.waiting && iTotalHeight + _options.padding >= $inner.outerHeight()) { _debug('info', 'jScroll:', $inner.outerHeight() - iTotalHeight, 'from bottom. Loading next request...'); return _load(); } }
Good catch, thanks!
Hi!
IE8 returns 'medium' instead of a number for css('borderTopWidth') when no border is set... that makes _observe fail working.
So I changed _observe to this:
function _observe() { var $inner = $e.find('div.jscroll-inner').first(), borderTopWidth = parseInt($e.css('borderTopWidth')), borderTopWidthInt = isNaN(borderTopWidth) ? 0 : borderTopWidth data = $e.data('jscroll'), iContainerTop = parseInt($e.css('paddingTop')) + borderTopWidthInt, iTopHeight = isWindow ? $scroll.scrollTop() : $e.offset().top, innerTop = $inner.length ? $inner.offset().top : 0, iTotalHeight = Math.ceil(iTopHeight - innerTop + _$scroll.height() + iContainerTop), nextHref = $.trim(data.nextHref + ' ' + _options.contentSelector);