The draggable image need to be re-sizable

Try this…

<html lang="en">

<meta charset="utf-8">
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1">

<title>untitled document</title>

<link rel="stylesheet" href="screen.css" media="screen">

<style media="screen">
body {
    background-color: #f0f0f0;
    font: 1em/150% verdana, arial, helvetica, sans-serif;
    text-align: center;
#wrapper {
    width: 45em;
    height: 34.375em;
    margin: auto;
    background-color: #fff;
    text-align: left;
#options, #frame {
    float: left;
    width: 12.5em;
    height: 100%;
    border: 1px solid black;
    box-sizing: border-box;
#frame {
    float: right;
    width: 32.25em;

#drag1, #drag2, #drag3  {
    width: 6.25em;
    height: 6.25em;
    margin: 1em auto 0;
    background-image: url(;
    background-size: 100% 100%;
#drag2 {
    background-image: url(;
#drag3 {
    background-image: url(;
.ui-draggable-helperMoving {
    width: 6.25em;
    height: 6.25em;
    padding: 0.375em;
    border: 1px dotted #000;
.ui-draggable-helperStoped {
    width: 0.3125em;
    height: 0.3125em;
    border: 1px solid #000;
.dragged1, .dragged2,  .dragged3 {
    position: absolute; 
    width: 18.75em;
    height: 18.75em;
    background-image: url(;
    background-size: 100% 100%;
.dragged2 {
    background-image: url(;
.dragged3 {
    background-image: url(;
    border: 1px solid #f00;
<div id="wrapper">
 <div id="options">
  <div id="drag1" class="drag"></div> 
  <div id="drag2" class="drag"></div>
  <div id="drag3" class="drag"></div>
  <div id="frame"></div>
<script src=""></script>
   google.load('jquery', '1.4.2');
   google.load('jqueryui', '1.7.2');
        counter = 0;
//Make element draggable
            containment: 'frame',
//When first dragged
            stop:function(ev, ui) {
            	var pos = $(ui.helper).offset();
            	objName = '#clonediv' + counter
            	$(objName).css({'left':pos.left, 'top'});
//When an existiung object is dragged
                	containment: 'parent',
                    stop:function(ev, ui) {
                    	var pos=$(ui.helper).offset();
//Make element droppable
      drop: function(ev, ui) {
         if (ui.helper.attr('id').search(/drag[0-9]/) != -1){
         counter ++;
         var element = $(ui.draggable).clone();
         $('#clonediv' + counter).removeClass('tempclass');
//Get the dynamically item id
   draggedNumber = ui.helper.attr('id').search(/drag([0-9])/);
   itemDragged = 'dragged' + RegExp.$1;
   var containment = $( '#frame' ).resizable( 'option', 'containment' );
// Setter
   $( '#frame' ).resizable( 'option', 'containment', 'parent' );


yup its working, Thank you for your support, But the right side image is not re-sizable.

refer the below link:

Final process need to be like the above link

I used the below coding for resizable:

$( ‘#frame’ ).resizable( ‘option’, ‘containment’, ‘parent’ );

But its not working


I don’t work with or on frameworks such as jQuery. :unhappy:

I’m just a simple vanilla sort of guy. :sunglasses:


Oh! okay. Is there any others are available to support me?

Thank you for your support Coothead

Do you know Jquery?

I would suggest that you look for jQuery assistance in the Javascript forum.


Okay Thank you Coothead

On reflection, I do not think that this is even possible. :rolleyes:

Dragging and resizing require identical mouse operations;
hold left mouse down then move mouse. :winky:

How is the system to know which operation is required. :wonky:

Mind reading, thankfully, is definitely not built into mine. :rofl:


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.