JSFiddle - React, Tailwind, and code Playground

HTML

<div class="item1">
  item1
<div class="item2">
    item2
</div>
</div>
<div class="item3">
    item3
</div>

CSS

.item1 {
    position:absolute;
    width:150px;
    height:150px;
    background-color:red;
    top:5%;
}

.item3, .item2 {
    position:absolute;
    width:50px;
    height:50px;
    background-color:green;
    top:15%;
    left:1%;
    display:none;
}

.item3 {
    top:18%;
}

JavaScript

var item1 = $(".item1");
var item2 = $(".item2");
var item3 = $(".item3");

item1.hover(
    function() {
      item2.show();
      item3.show();
    },
    function() {
      item2.hide();
      item3.hide();
    }
    
);

item2.hover(
    function() {
      item3.hide();
    },
    function() {
    }
    
);

item2.click(
    function() {
        alert("Perform item2 function");
    }
);

item1.click(
    function() {
        alert("Perform item1 function");
    }
);