1
我遇到了Sly滚动条的问题。Javascript Libraray SLY - 滚动条不起作用
我想设置一个时间线,在该时间线中,我可以通过拖动鼠标和滚动条进行滚动。用鼠标滚动工作正常,但我不能让滚动条工作,并没有适当的文件。
控制台上也没有错误。
这是我的滚动条:
<div id="scrollbar">
<div class="handle"></div>
</div>
这是CSS:
#scrollbar {
width: 100%;
height: 30px;
background: #f00;
margin-top: 10px;
line-height: 0;
}
#scrollbar .handle {
width: 50px;
height: 30px;
background: #00f;
position: absolute;
}
和JavaScript调用initate滚动
$("#timeline").sly({
dragSource : '.frame',
horizontal : 1,
itemNav: 'basic',
smart : 1,
activateOn : 'click',
mouseDragging : 1,
touchDragging : 1,
releaseSwing : 1,
scrollBy : 1,
activatePageOn : 'click',
speed : 50,
easing : 'easeInOutBounce',
swingSpeed : 0.07,
elasticBounds : 1,
dragHandle : 1,
dynamicHandle : 1,
clickBar : 1,
scrollbar : '$("#scrollbar")',
dragHandle : 1
});
我需要这个大学项目,如果有人解决我的问题,那将会非常酷。