I have this html code:
<label>
<img class="jogo" value="lol" src="../cdn/img/jogos/lol.png">
<img class="jogo" value="csgo" src="../cdn/img/jogos/csgo.png">
</label>
<br><div class="atual"> </div>
I wanted the div below to show the value of the images above (lol / csgo)
$(function(){
$(".jogo").click(function(){
$(".jogo").animate({opacity:0.5},{duration:100});
$(this).animate({opacity:1},{duration:100});
var jogo = $(this).val();
$(".atual").html(jogo);
});
});
I do not know how I do this: /
jsfiddle code: link