diff --git a/src/jquery.smoothwheel.js b/src/jquery.smoothwheel.js index 9624f4a..1f2829d 100644 --- a/src/jquery.smoothwheel.js +++ b/src/jquery.smoothwheel.js @@ -131,7 +131,10 @@ targetY = oldY = container.get(0).scrollTop; currentY = -targetY; - minScrollTop = container.get(0).clientHeight - container.get(0).scrollHeight; + $(window).resize(function(){ + minScrollTop = container.get(0).clientHeight - container.get(0).scrollHeight; + }); + if(options.onRender){ onRenderCallback = options.onRender; } @@ -150,4 +153,4 @@ }; -})(jQuery); \ No newline at end of file +})(jQuery);