I have a little thumbnail that represents all the window. You can move the div #maquetaPant
and the window should to scroll at the same time you move the little square.
You can try this jsfiddle:
http://jsfiddle.net/oscardr/H2tEN/
Move the little square to scroll the window. If you try to change the drag event for a stop event then it works well.
The code is here. If I put the function "dragMaqueta" in the stop event, then it works well. But I want it in the drag event to scroll the window at the same time of dragging the square. But if you try you'll see that doesn't work. It seems that window.scrollTo(scrollX,scrollY)
moves the #maquetaPant outside the container.
Do you know how to solve it?
Thank you!