I'm trying to make elements within an iframe draggable and resizable.
First the user can add elements such as images and divs which appends into an iframe (same domain). Therefore I have tried searching within iframe using
$("#iframeDiv").contents().find(".draggable").draggable();
$("#iframeDiv").contents().find(".draggable").resizable();
#iframeDiv
being the iframe id
.draggable
being the image class
I have also tried getElementId() to find the element within the iframe and then used
$(function() {
$( ".draggable" ).draggable();
});
$(function() {
$( ".draggable" ).resizable();
});
but neither one has worked.
Is there another function I could use to make it draggable/resizable?
UPDATE: With some help, I have solved the draggable issue. However, I still cannot resize any elements.
Here is a JSFiddle. A jpg image needs to be uploaded