Is there an easy way to do click-and-drag scrolling in text frames?

drag-and-drop, javascript, scroll

Solution

Here is a nice implemenation of drag and scroll divs https://github.com/mvlandys/jquery.dragscrollable

below is my original link that I posted. Looks like someone edited my answer.

http://hitconsultants.com/dragscroll_scrollsync/scrollpane.html

Problem

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. | | | | | | ------------------- ```

Original source