Want to achieve a JS effect, I do not know where to start, but also ask the elders to guide?

when the first-level menu bar is selected with the mouse on the left, it is blue, and when I move to the next menu bar, the selected parent menu bar is also displayed. How to implement this piece of JS? please give us some guidance.

Mar.18,2021

isn't this the tab


css can

//html
<li class='father'>
    <div class='children'></div>
</li>
<li class='father'>
    <div class='children'></div>
</li>
   .....
   //css
.children{display:none}
.father:hover{bacnground:blue}
.father:hover .children{display:block}
Menu