3

我正在使用 SmoothDivScroll 1.1 并且一切正常,直到我在浏览器中缩小(在 Windows 7 上测试的 firefox、chrome 和 safari)(放大滚动条时不会停止)。SmoothDivScroll 的加载方式是:

$(window).load(function() {
$("div#projectenRijEen").smoothDivScroll({}); 
$("div#projectenRijTwee").smoothDivScroll({});
$("div#projectenRijDrie").smoothDivScroll({});
$("div#projectenRijEen").bind("mouseover",function(){$(this).smoothDivScroll("stopAutoScroll")}).bind("mouseout",function(){$(this).smoothDivScroll("startAutoScroll")});
$("div#projectenRijTwee").bind("mouseover",function(){$(this).smoothDivScroll("stopAutoScroll")}).bind("mouseout",function(){$(this).smoothDivScroll("startAutoScroll")});
$("div#projectenRijDrie").bind("mouseover",function(){$(this).smoothDivScroll("stopAutoScroll")}).bind("mouseout",function(){$(this).smoothDivScroll("startAutoScroll")})
});

我尝试了以下内容:

$(window).load(function() {
var $scrollElement = $("div#projectenRijEen");
$scrollElement.smoothDivScroll({});
$(window).resize(function () {
    $scrollElement.data({
    motherElementOffset: $scrollElement.offset().left
    });
});
});  

http://www.codingforums.com/showthread.php?t=241455上找到,但我无法让它工作

有人可以帮我缩小缩小时如何保持滚动条滚动吗?

4

1 回答 1

0

我知道这个问题并做了一些测试并尝试了一些技巧来解决它。到目前为止,我已经取得了一些进展,但这是一个棘手的问题,我还没有解决这个问题。此问题在 GitHub ( https://github.com/tkahn/Smooth-Div-Scroll/issues/2 ) 上报告。你可以关注那里的讨论。

于 2012-04-13T08:39:38.127 回答