I'm trying to move one item to next box, but the event dragover and dragenter wasn't detected. Can someone explain this?
let dropTarget = $('.box'),
dropSource = $('.inner-box');
dropTarget.on('dropover dropenter', function(e) {
e.preventDefault()
console.log(1)
})
.box {
width: 80px;
height: 80px;
border: 1px solid black;
}
.inner-box {
width: 100%;
height: 100%;
background: red;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<div class="box">
<div class="inner-box" draggable="true"></div>
</div>
<div class="box"></div>
<div class="box"></div>