开发者

Work around for jQuery draggable and resizeable on image

开发者 https://www.devze.com 2023-02-05 21:09 出处:网络
Trying to apply both draggable and resizeable with jQuer开发者_JAVA技巧y to an image does not work correctly. It will resize but not drag. Are there any known solutions to this?This seems to work fine

Trying to apply both draggable and resizeable with jQuer开发者_JAVA技巧y to an image does not work correctly. It will resize but not drag. Are there any known solutions to this?


This seems to work fine if I wrap the img in a div:

<div id="drag_resize"><img src="img.jpg"/></div>

And then call resizeable and draggable on that div:

$("#drag_resize").resizable().draggable();

Here's a working example: http://jsfiddle.net/andrewwhitaker/HNYVk/

0

精彩评论

暂无评论...
验证码 换一张
取 消