JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css">
<div class="demo">

 <div class="border">
  <img src="http://www.imageuploading.net/image/thumbs/large/border-564.png">
 </div>

 <div id="draggable" class="ui-widget-content">
  <p>Drag from here</p>
        
  <div class="dragme">
   <img src="http://i142.photobucket.com/albums/r117/SaltyDonut/Icons/evilpuppy.gif">
  </div>
        
 </div>
    
 <div id="droppable">
  <p>Drop here</p>
 </div>
    
</div>

CSS

#draggable, #droppable {
 width: 450px;
 height: 250px;
 padding: 0.5em;
 margin: 10px;
 background: #ddd;
 color:#000;
}
.dragme {
 position: relative;
 width: 100px;
 padding: 5px;
}
.dragme img {
 position: absolute;
 top: 55px;
 left: 30px;
}
.demo {
 width: 500px;
}
.border {
 position: absolute;
 top: 75px;
 left: 30px;
 z-index: 1;
}

JavaScript

$(document).ready(function(){
 // cycle through draggable divs (in case there are more than one)
 $(".dragme").each(function(){
  var img = $(this).find('img');
  var pos = img.position();
  // create div overlay on image
  $('<div/>', {
   class : 'overlay',
   css: {
    position: 'relative',
    top: pos.top,
    left: pos.left,
    width: img.outerWidth(),
    height: img.outerHeight(),
    zIndex: 100
   }
  })
   // save original image position
   .data('pos', [pos.left, pos.top])
   .appendTo($(this));

  // make overlay draggable
  $(this).find('.overlay').draggable({
   containment : '.demo',
   revert: true,
   revertDuration: 0,
   handle: 'div',
   // drag overlay and image
   drag: function(e,ui){
    img = $(this).parent().find('img');
    img.css({
     top: ui.position.top,
     left: ui.position.left
    });
   },
   // make image revert
   stop: function(e,ui){
    pos = $(this).data('pos');
    $(this).parent().find('img').animate({left: pos[0], top: pos[1] },500);
   }
  });
 });
        
 $("#droppable").droppable({
  drop : function(e,ui) {
   // append entire div wrapper (.dragme)
   ui.helper.parent().appendTo($(this));
  }
 });
});