JSFiddle - React, Tailwind, and code Playground
HTML
<div id="contain">
<div id="one"></div>
<div id="two"></div>
<div id="three"></div>
<div id="four"></div>
</div>
CSS
#contain {
width: 400px;
height: 400px;
}
#one {
width: 40%;
height: 50%;
float: left;
background-color: red;
}
#two {
width: 50%;
height: 50%;
float: left;
background-color: blue;
}
#three {
clear: both;
float: left;
width: 60%;
height: 50%;
background-color: green;
}
#four {
float: left;
width: 30%;
height: 50%;
background-color: yellow;
}
JavaScript
$(function () {
$('#contain').on('dragleave', function (e) {
if (e.relatedTarget === null) {
console.log('relatedTarget is null');
}
});
});