JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://code.jquery.com/jquery-2.2.0.min.js"></script>
<div id="parent" class="hover">
<div class="child hover">
1
</div>
<div class="child hover">
2
</div>
<div class="child hover">
3
</div>
<div class="child hover">
4
</div>
</div>
<p id="output">
</p>
CSS
#parent {
width: 100%;
background-color: white;
padding: 24px;
}
.child {
width: 50%;
margin: 0 auto;
padding: 8px;
background-color: #ff7300;
margin-top: 8px;
margin-bottom: 8px;
text-align: center;
}
JavaScript
$(document).ready(function() {
//e = the event of the mouse leaving
$('.hover').mouseout(function(e) {
console.log(e);
if (e.currentTarget.id == "parent") {
$('#output').text('Parent!')
})
})