I am performing a on mouseenter / mouseleave with jQuery and it appears to be working but not when I exit the div. This is only working when I exit the actual window.
This is my jQuery
$(document).ready(function() {
$(".pods .col").on("mouseenter", function() {
$(this).find(".pod-overlay").addClass("show")
});
$(".pods .col").on("mouseleave", function() {
$(this).find(".pod-overlay").removeClass("show")
});
});
This is my HTML
<div id="splash" class="section section-splash bg">
<div class="pods">
<div class="col col-4">
<div id="pod-splash-food" class="pod pod-food">
<div class="pod-overlay"></div>
</div>
</div>
</div>
</div>
I have done a js fiddle here. I am learning jquery, so advice is appreciated.