I have a situation where I have multiple divs within a parent div, all using the same class. Here is an example:
<div class="deck-content">
<div class="deck-box">TEST<
<div class="deck-hidden"><
<span class="glyphicon glyphicon-eye-open eye-open" aria-hidden="true"></span><
<span class="glyphicon glyphicon-pencil pencil" aria-hidden="true"></span><
<span class="glyphicon glyphicon-remove remove" aria-hidden="true"></span><
</div><
</div><
<div class="deck-box">TEST<
<div class="deck-hidden"><
<span class="glyphicon glyphicon-eye-open eye-open" aria-hidden="true"></span><
<span class="glyphicon glyphicon-pencil pencil" aria-hidden="true"></span><
<span class="glyphicon glyphicon-remove remove" aria-hidden="true"></span><
</div><
</div><
<div class="deck-box">TEST<
<div class="deck-hidden"><
<span class="glyphicon glyphicon-eye-open eye-open" aria-hidden="true"></span><
<span class="glyphicon glyphicon-pencil pencil" aria-hidden="true"></span><
<span class="glyphicon glyphicon-remove remove" aria-hidden="true"></span><
</div><
</div><
</div><
My goal is to make the child div with the class deck-hidden
visible when I hover over its parent div with the class deck-box
.
The issue I am facing is that I do not know in advance how many deck-box
divs there will be, so assigning unique IDs to each one is not feasible.
Is there a way to achieve the desired effect of showing the respective deck-hidden
div when hovering over a deck-box
without individual IDs?