繁体   English   中英

Smooth Div Scroll无法正确显示

[英]Smooth Div Scroll not correctly displaying

我正在尝试实现div平滑滚动,尤其是“ Clickable Logo Parade”: http : //www.smoothdivscroll.com/clickableLogoParade.html

而且我完全按照我想要的方式在空白页中工作,但是当我将其插入当前布局时,它无法正常工作。.我假设有什么干扰吗?

有什么帮助吗?

这是我添加到CSS中的内容:

#logoParade
{
width: 628px;
height: 75px;
position: relative;
}

#logoParade div.scrollableArea a
{
display: block;
float: left;
padding-left: 10px;
}

这是我添加的jQuery:

<script type="text/javascript">
$(document).ready(function() {
$("#logoParade").smoothDivScroll({ 
    autoScrollingMode: "always", 
    autoScrollingDirection: "endlessLoopRight", 
    autoScrollingStep: 1, 
    autoScrollingInterval: 25 
});

// Logo parade event handlers
$("#logoParade").bind("mouseover", function() {
    $(this).smoothDivScroll("stopAutoScrolling");
}).bind("mouseout", function() {
    $(this).smoothDivScroll("startAutoScrolling");
});

});
</script>

这些文件包括:

<script src="js/jquery-ui-1.8.23.custom.min.js" type="text/javascript"></script>

<!-- Latest version (3.0.6) of jQuery Mouse Wheel by Brandon Aaron
     You will find it here: http://brandonaaron.net/code/mousewheel/demos -->
<script src="js/jquery.mousewheel.min.js" type="text/javascript"></script>

<!-- jQuery Kinectic (1.5) used for touch scrolling -->
<script src="js/jquery.kinetic.js" type="text/javascript"></script>

<!-- Smooth Div Scroll 1.3 minified-->
<script src="js/jquery.smoothdivscroll-1.3-min.js" type="text/javascript"></script>

当然还有实际的jQuery。

我上传了我的代码,试图在这里实现它,您可以看看: http : //www.mintystudios.co.uk/clients/naghmeh/

这是空白页中的工作版本。.: http : //www.mintystudios.co.uk/clients/naghmeh/1/

有人知道为什么它不能在已实现的版本中工作吗?

这应该可以解决您的问题; 用您的脚本替换它。

<SCRIPT type="text/javascript">

jQuery(function ($) {
    $("#logoParade").smoothDivScroll({ 
        autoScrollingMode: "always", 
        autoScrollingDirection: "endlessLoopRight", 
        autoScrollingStep: 1, 
        autoScrollingInterval: 25 
    });

    // Logo parade event handlers
    $("#logoParade").bind("mouseover", function() {
        $(this).smoothDivScroll("stopAutoScrolling");
    }).bind("mouseout", function() {
        $(this).smoothDivScroll("startAutoScrolling");
    });

});
    </SCRIPT>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM