I have a div container with a nested span element (simplified).
<div class="divDash">
<span>XX</span>
</div>
The CSS styling for the div makes the span initially hidden and only visible when hovering over the parent div.
.divDash {height:300px;width:300px;border:1px solid gray;}
.divDash span {display:none}
.divDash:hover span {display:inline}
After certain user interactions, I need to hide the span using jQuery...
$('.divDash').children('span').hide();
Subsequently, if I try to simply show the span again by using
$('.divDash').children('span').show();
, it remains permanently visible instead of just on hover as intended.
How can I restore the original CSS behavior so that the span is only shown on hover?