javascript - JqueryUI resize & draggable does not work together? -
I have a problem using jqueryui resize and draggable same elements should work together? In this version, I can resize the image, but I can not drag it. The idea is to be able to pull the image in the large Divi, but it does not change the big internal Divel it should be the end result would be a worthy how to pull a signal to change the size in the same element Is
here in it
here HTML
& lt ?. Div id = "container" & gt; & Lt; Div id = "region" & gt; & Lt; div class = "testi" & gt; & Lt; img class = "imageHere" width = "200" src = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibQpLmEpS580SE5rzQG3aCU_X7c524Y4yOvwmFQt4swgUDruH4e-2ZXrPaT6oEgs6ovQsTBqK3ZWY5LhO-kAWryNPDQPkLx4J7_f1OGIgZJ3R9soT-OeKvqq7v16PLSnY6lJ6RzX3VFCo/ /google-logo-874x288.png" / & gt ; & Lt; / Div & gt; & Lt; / Div & gt;
css
#area {status: absolute; Top: 67px; Left: 75px; Border: Solid 2px; Height: 215px; Width: 600px; Background color: #fff; } .imageHere {} # container {status: relative; Swim left; Margin-left: 50px; Border: Solid 2px; Height: 350px; Width: 750px; } JavaScript
$ (function () {$ ( ".imageHere") .draggable ({cursor: "trick", preventing "# container "}). Resizable ({prevention:" # container "})}};
< p> what this code is that you're looking for: $ (function () {$ ( ".testi"). Draggable (); $ ( ".image here") .resizable ();});
You must point your drag-in to a device containing the image.
Comments
Post a Comment