showing multiple images on click hey I have this script that I made in order to show a simple image on click.
I'm now trying to display different images by just one click but I'm stuck...
Could you help me find a way to display all the three images on a simple click on show?
Thanks!


$(document).ready(function(){
$(".exposition").on('click',function(){
   
   var hello = $(this).attr('data-id');
   $('.photos-evenements').hide();
   $('#'+hello).show();
});
});
.photos-evenements{
    display:none; 
    max-width: 100%;
    max-height: 90vh;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<a href='#' class="exposition"  data-id="divId1">show</a>
<a href='#' class="exposition"  data-id="divId2">show 2</a> 
<div class="exposition">
  <div class="photos-ind"><img id="divId1" class="photos-evenements" src="http://follebeton.com/img/Performances%20OK.jpg" data-id="divId1"/></div>
  <div class="photos-ind"><img id="divId1" class="photos-evenements" src="http://follebeton.com/img/333_3.png" data-id="divId1"/></div>
  <div class="photos-ind"><img id="divId1" class="photos-evenements" src="http://follebeton.com/img/333_1.png" data-id="divId1"/></div>
</div>



<div class="exposition">
  <div class="photos-ind"><img id="divId2" class="photos-evenements" src="http://follebeton.com/img/Performances%20OK.jpg" data-id="divId2"/></div>
  <div class="photos-ind"><img id="divId2" class="photos-evenements" src="http://follebeton.com/img/333_3.png" data-id="divId1"/></div>
  <div class="photos-ind"><img id="divId2" class="photos-evenements" src="http://follebeton.com/img/333_1.png" data-id="divId1"/></div>
</div>



Sure, the # selector only selects the first occurrence of the element with that id, to find all elements with that id, just change the selector to [id=' + hello + ']'
This is the final code:
$(document).ready(function(){
$(".exposition").on('click',function(){
   
   var hello = $(this).attr('data-id');
   $('.photos-evenements').hide();
   $('[id='+ hello + ']').show();
});
});

the id attribute is suppose to be unique, that's why the # only finds the first occurrence, and that's also why you should use classes instead of an id