I am trying to make a pan tool for a map. I have something like this:
<div id="container">
<img id="map" src="x.jpg" />
</div>
And in JS I have the following code:
$("#map").draggable();
It works fine, It drags. But I wanted the img (#map) to drag only
inside the div (#container) and not to come out of it.
On Firefox, I fixed it by setting #container overflow to hidden, but
in IE I still have the same problem.
I don't know how to fix it. I tried using the parent option like this:
$("#map").draggable({ containment: 'parent' });
But It's not what I need. I need id it to drag freely, but inside the
#container.
Any help would be amazing.
Natán
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---