Drag a zoomed image within a div clipping mask using jQuery draggable?
问题 I'm creating an interface to allow a user to zoom in on an image and drag the zoomed version around within a clipping mask div. I have a div 200px by 200px that I set overflow: hidden on. Then I load a std img ( <img src="etc"> ) into the div that is, say, 1000px by 1000px . Then I use jQuery $("#my-image").draggable({ containment: [-85,83,99,222] }); The numbers are hard coded. So far I can only find them by trial and error... The problem is that each time I make a change to the page (Ie