Is there an easy way to do click-and-drag scrolling in text frames?
Posted
by Skilldrick
on Stack Overflow
See other posts from Stack Overflow
or by Skilldrick
Published on 2010-05-18T14:48:47Z
Indexed on
2010/05/21
21:20 UTC
Read the original article
Hit count: 207
I have a div with overflow:auto
and a scroll bar, and I'd like to be able to drag the contents to scroll. I don't need to be able to select text. Is there an easy way to do this? A jQuery plugin would be good, otherwise plain old JavaScript would be fine.
It seems I haven't made myself clear enough. There's a div with a fixed height that I want to scroll. Instead of picking up the scroll bar, I want to click and drag inside the text in the opposite direction. Like on an iPhone. Like in Photoshop when you hold down space and drag.
-------------------
| | |
| | |
| |||
| | |
| <----------- click here and drag to scroll.
| | |
| | |
-------------------
© Stack Overflow or respective owner