JSFiddle - React, Tailwind, and code Playground
by Gerald Fullam
HTML
<div id="my_cool_div" draggable="true">
<div class="what_a_drag" draggable="true"></div>
</div>
<div id="target"></div>
CSS
#my_cool_div {
width: 100px;
height: 100px;
background-color: tomato;
cursor: move;
}
.what_a_drag {
width: 50px;
height: 50px;
background-color: lime;
cursor: move;
}
#target {
width: 100px;
height: 100px;
background-color: plum;
}
JavaScript
$("#target").on("dragover", function (e) {
e.preventDefault();
});