0

with jquery.Draggable and its option containment I was able to setup a draggable box within a wrapper. Say that the wrapper is 1000 x 1000 pixel large, I'd like to put it within a viewport div that is only 100 x 100 pixel large with overflow: scroll set.

How can I make the dragging of my 10x10px box make the inner div scroll within the viewport div when dragged towards its margins?

I've tried with the scroll option but it didn't work.

To clarify:

enter image description here

Thanks

1 Answer 1

2

Look at this example in the Draggable documentation: http://jqueryui.com/demos/draggable/#scroll It describes your situation exactly ;)

Nice pictures by the way!

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.