I have a question :
Here is the HTML code snippet:
<div class="a b">
<span class="one">Success ONE</span>
<span class="two">ONE</span>
</div>
<div class="a b">
<span class="one">Success TWO</span>
<span class="two">TWO</span>
</div>
I am trying to display the content of .two which is hidden by default. When using CSS, I can achieve it like this:
.two {visibility:hidden;}
.a:hover .two {visibility:visible;}
Although this CSS solution works fine, I am unable to use .a:hover .two {visibility:visible;} in my case. So, I am looking for a JavaScript alternative to show .two when hovering over the .a class. Can you assist me in achieving the same result with JavaScript as achieved with CSS using
.a:hover .two {visibility:visible;}
)?