Is there a way to make a check mark ✓ appear in the upper right corner of an image when it is clicked on? The intention is for the icon to disappear when another image is selected, following the same effect that has been implemented.
I have looked but haven't been able to find the correct solution using Jquery or CSS
.cc-selector input{
margin:0;padding:0;
-webkit-appearance:none;
-moz-appearance:none;
appearance:none;
}
.cc-selector input:active +.drinkcard-cc{opacity: .9;}
.cc-selector input:checked +.drinkcard-cc +.fa-check{
-webkit-filter: none;
-moz-filter: none;
filter: none;
display: show;
}
.drinkcard-cc{
cursor:pointer;
background-size:contain;
background-repeat:no-repeat;
display:inline-block;
-webkit-transition: all 100ms ease-in;
-moz-transition: all 100ms ease-in;
transition: all 100ms ease-in;
-webkit-filter: brightness(1) grayscale(1) opacity(.7);
-moz-filter: brightness(1) grayscale(1) opacity(.7);
filter: brightness(1) grayscale(1) opacity(.7);
}
.drinkcard-cc:hover{
-webkit-filter: brightness(1.04) grayscale(.5) opacity(1.2);
-moz-filter: brightness(1.04) grayscale(.5) opacity(1.2);
filter: brightness(1.04) grayscale(.5) opacity(1.2);
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="cc-selector">
<div>
<input checked="checked" id="checkRabbit" type="radio" name="rabbit" value="rabbit">
<label class="drinkcard-cc rabbit" for="checkRabbit">
<img src="https://pbs.twimg.com/profile_images/378800000012999353/237fc396ff1510bb381c2a534a834fd7.jpeg" class="img-responsive">
</label>
</div>
<div>
<input id="checkMonkey" type="radio" name="monkey" value="monkey">
<label class="drinkcard-cc monkey" for="checkMonkey">
<img src="https://pbs.twimg.com/profile_images/653420524975079424/VOzhTPsz_400x400.jpg" class="img-thumbnail">
</label>
</div>
</div>