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
});
我需要這個大學項目,如果有人解決我的問題,那將會非常酷。