How to drag and scroll in a div with jQuery

前端 未结 1 505
甜味超标
甜味超标 2020-12-13 21:22

I\'ve been looking around for some time now, but I can\'t find a way to combine these elements:

I want a 100% width div, with 1 row of elements. I need to scroll thr

相关标签:
1条回答
  • 2020-12-13 21:57

    Utterscroll is a drag and scroll library I've written: (EDIT: demo temporarily broken, seems a CDN link no longer works,)

    GitHub: https://github.com/debiki/utterscroll
    GitHub hosted demo: http://rawgit.com/debiki/utterscroll/master/utterscroll-example.html

    It differs from other libraries in that it 1) understands if you intend to select text, rather than scrolling (note that in the example linked to by the question, it's not possible to select text), and 2) it needs no, or almost no, configuration.

    Utterscroll stops when you release the mouse though (just like Dragscrollable, in the answer above, does.)

    0 讨论(0)
提交回复
热议问题