JSFiddle - React, Tailwind, and code Playground

HTML

<a href="#header-cart" id="custom_headercart" class="skip-link skip-cart" style="border: 1px solid black">    
	<img src="https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcRTClkntD56hOwVYr-e1blK4kXVusYujzM-ErrlL6QhonsYjqdK" alt="" width=18>
	<span>12</span>
 </a>
    
<div id="dropdown_div" style="display: none">
    Dropdown div content
</div>

JavaScript

$("#custom_headercart").on("mouseover", function(){
    $("#dropdown_div").toggle();
})

$j("#custom_headercart span").mouseover(function(event){
 event.stopPropagation();
});

$j("#custom_headercart img").mouseover(function(event){
 event.stopPropagation();
});