I have a problem, I am using jquery, and I need that when I press an element a style is applied, the problem is that all the elements have the same class and I can evaluate it with the event object that I receive the function, but that's only when you have an X number of items that you know, but the elements that are coming from a DB query, so it's a problem to apply the style to that single element clicked, here I leave the code:
<div class="tarjeta-imagen">
<img src="./assets/img/perfil.jpg" alt="" class="img-card">
<div class="tarjeta-footer">
Texto de prueba
</div>
</div>
JQ:
$(".tarjeta-imagen").click( function(e){
var elEvento = e;
$(".tarjeta-footer").css({
background: '#4BD19B'
});
})