I'm trying to show the elements in another div when hovering over a div. This is what I have now, and it's not working. Currently, it just doesn't do anything on hover, it is just non-responsive. Any tips would be greatly appreciated. I am not using any other languages such as JQuery. Thank you!
HTML/React
<div className="parent">
<div className="show-me">
<Element />
</div>
<div className="hover-me">
<span>hi</span>
</div>
</div>
SCSS:
.parent {
.hover-me {
@include icon('help', inherit);
color: $b500-blue;
span {
font-weight: 700;
}
}
.show-me {
.show-me-body {
opacity: 0;
}
}
.hover-me:hover ~ .show-me .show-me-body {
opacity: 1;
}
}
The below answer works, but I could not get it to work with the element I have inside show-me.