<div class="container">
  <div class="d-flex">
    <div class="target" id="target1"></div>
    <div class="target" id="target2">
      <div class="box" id="box1" draggable="true">drag me</div>
    </div>
    
  </div>
</div>
.target{
  width: 300px;
  height: 200px;
  border: 2px dashed gray;
  margin:20px;
  padding:10px;
}
.box{
  width: 200px;
  height: 150px;
  background: pink;
  padding:20px;
}
$(".box").on({
  "dragstart": function(event){
    console.log("dragstart");
  event.originalEvent.dataTransfer.setData('text/plain',event.target.id)
  },
  "dragend": function(){
    console.log("dragend");
  }
})

$(".target").on({
  "dragenter": function(){
    console.log("dragenter");
  },
  "dragover": function(event){
    event.preventDefault();
    console.log("dragover");
  },
  "dragleave": function(){
    console.log("dragleave");
  },
  "drop": function(event){
    event.preventDefault();
    console.log("drop");
    let id = event.originalEvent.dataTransfer.getData('text/plain');
    $("#"+id).appendTo(event.target);
  }
})

External CSS

  1. https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/css/bootstrap.min.css

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js