Panning around inside a div?

Soldato
Joined
23 Oct 2003
Posts
8,899
Location
Hampshire, UK
Hi folks,

I have a div with a pic in it which is too large, so there are scrollbars. This is done on purpose. I want the user to be able to drag or pan the image around in addition to using the scrollbars.
Is this possible?

Thanks!

Dave
 
It's possible as far as I can imagine, but it'd be pretty complex. You'd be best off adapting an existing drag-and-drop script and modifying it so that it scrolls the div rather than moves the element.
 
bit of a long shot but could you use a transpart div as a sort of a mask. and use some buttons linked to some javascript which when clicked changes the position of the image div so its position moves under the mask. Bit like a roleover you'd use for an image link.

But like Rob said a better way would be to alow the user to drag the image.
 
Back
Top Bottom