<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
    <title>ferrum drag_to and drag_by</title>
    <link rel="icon" href="data:,">
    <script src="/jquery.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="/jquery-ui.min.js" type="text/javascript" charset="utf-8"></script>
    <style>
      #drag_by {
        position: relative;
        width: 200px;
        height: 100px;
      }
      #drag_by .draggable {
         position: absolute;
         width: 100px;
         height: 50px;
       }
      #drag_by div{ position: absolute; left: 0; }
      #draggable { width: 60px; height: 60px; padding: 0.2em; }
      #droppable { width: 100px; height: 100px; padding: 0.2em; }
    </style>
    <script>
      $(function() {
        $( ".draggable" ).draggable();
        $( "#droppable" ).droppable({
          drop: function( event, ui ) {
            $( this )
              .addClass( "dropped" )
              .find( "p" )
                .html( "Dropped!" );
          }
        });
      });
    </script>
  </head>
  <body>
    <div id="drag_to">
      <div id="draggable" class="draggable">
        <p>Drag me</p>
      </div>
      <div id="droppable">
        <p>Drop here</p>
      </div>
    </div>

    <div id="drag_by">
      <div class="draggable">
        <p>Drag me by</p>
      </div>
    </div>
  </body>
</html>
