Search code examples
javascriptjqueryjquery-uidraggableresizable

Work around for jQuery draggable and resizeable on image


Trying to apply both draggable and resizeable with jQuery to an image does not work correctly. It will resize but not drag. Are there any known solutions to this?


Solution

  • 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/