try this:
$("#resizebleImage").resizable().parent().draggable();
On Oct 1, 5:43 pm, CommunityUISteve <[EMAIL PROTECTED]> wrote:
> Hi,
>
> How can I create a draggable & resizable image?
>
> js:
> $(document).ready(function(){
> $("#resizebleImage").draggable();
> $("#resizebleImage").resizable({ handles: "all", ghost: true });
> });
>
> This makes the image resizable only.
>
> So I tried this code - a double click on the image toggles the resize/
> drag functionality. It only works once, the image cannot revert to
> draggable.
>
> $("img").dblclick(function () {
> toggle();
>
> });
>
> var canDrag=true;
> function toggle() {
> canDrag=!canDrag;
>
> if (canDrag)
> $("#resizebleImage").draggable();
> else
> $("#resizebleImage").resizable({ handles: "all", autoHide:
> true });
> }
>
> html:
> <img id="resizebleImage" src="images/peanut.gif" width="200px"
> height="135px">
>
> What have I done wrong?
>
> Steve
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---