【发布时间】:2013-08-06 14:30:34
【问题描述】:
我今天的问题是正在运行的代码只滚动一次。 “makeMeScrollable”包含应该无限滚动的文本,但实际上只滚动到文本末尾。知道可能是什么原因造成的吗? Firebug 显示没有问题
这是我的代码:
这是在头脑中:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
<script src="js/jquery-ui-1.8.23.custom.min.js"></script>
<script src="js/jquery.mousewheel.min.js"></script>
<script src="js/jquery.smoothdivscroll-1.3-min.js"></script>
<script type="text/javascript">
// Initialize the plugin with no custom options
$(document).ready(function () {
// None of the options are set
$("#makeMeScrollable").smoothDivScroll({
autoScrollingMode: "always",
autoScrollingDirection: "endlessLoopRight",
autoScrollingStep: 1,
autoScrollingInterval: 15
});
$("#makeMeScrollable").bind("mouseover", function () {
$("#makeMeScrollable").smoothDivScroll("stopAutoScrolling");
});
$("#makeMeScrollable").bind("mouseout", function () {
$("#makeMeScrollable").smoothDivScroll("startAutoScrolling");
});
});
</script>
这是在正文中:
<div id="makeMeScrollable">
<p>this contains very long text</p>
</div>
【问题讨论】:
标签: javascript jquery news-ticker