nikoshot,
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
[data-id] {
display: none;
}
[data-id].open {
display: block;
}
</style>
<script>
document.addEventListener("DOMContentLoaded", function() {
let elem = document.querySelector(".box_1");
elem.addEventListener("mousemove", function({
target
}) {
target = target.closest("[data-main-id]");
if (target) {
let id = target.dataset.mainId;
let open = document.querySelector("[data-id].open")
if (open) open.classList.remove("open");
let sel = `[data-id="${id}"]`;
document.querySelector(sel).classList.add("open")
};
});
elem.addEventListener("mouseleave", function() {
let open = document.querySelector("[data-id].open")
if (open) open.classList.remove("open");
})
})
</script>
</head>
<body>
<div class="box_1">
<li class="hav_sub" data-main-id="99">111</li>
<li class="hav_sub" data-main-id="105">222</li>
<li class="hav_sub" data-main-id="23">333</li>
</div>
<div class="box_2">
<div class="subcategory_box" data-id="99">aaa</div>
<div class="subcategory_box" data-id="105">sss</div>
<div class="subcategory_box" data-id="23">ddd</div>
</div>
</body>
</html>