2
I have a question in jQuery:
I have the following code inside a page, where the DIV "Description-img" repeats itself more than once:
<div class="description-img">
<div class="confirmacao" style="display: block; ">
<p class="votoMsg">VOCÊ VOTOU!</p>
<span class="name"><a hreh="#" id="linkShare">Share Design</a>
<div id="share" style="display:none;">Links para compartilhamento</div>
</span>
</div>
</div>
<div class="description-img">
<div class="confirmacao" style="display: block; ">
<p class="votoMsg">VOCÊ VOTOU!</p>
<span class="name"><a hreh="#" id="linkShare">Share Design</a>
<div id="share" style="display:none;">Links para compartilhamento</div>
</span>
</div>
</div>
When I use jQuery’s show()/Hide() to show/hide the div "#share" by clicking the "#linkShare" button, it takes all the Ivs from the page. How do I get him to pick up exactly the DIV that is inside each corresponding block?
Thank you so much for the light!
You don’t duplicate Ids exactly for that, put different Ids on each element.
– ptkato