1
I would like a tip to make sure that when clicking on the list, it waves the correct question and nods the wrong one, or just the right one if the person got it right,
<div class="container">
<div class="row">
<div class="col-sm-12">
<h2>Simulado Detran – Prova Teórica com Gabarito e Respostas</h2>
<div class="questao">Questão</div>
<div class="pergunta"> <p>1º Pergunta do Simulado</p>
</div>
<div class="respostas">
<div class="list-group">
<a href="#" class="list-group-item item1" id="1" onclick="recebeResposta( this.id )"><div class="icone"></div>Resposta 1 da Primeira Pergunta</a>
<a href="#" class="list-group-item item2" id="2" id="item2" onclick="recebeResposta( this.id )"><div class="icone2"></div>Resposta 2 da Primeira Pergunta</a>
<a href="#" class="list-group-item item3" id="3" onclick="recebeResposta( this.id )"><div class="icone3"></div>Resposta 3 da Primeira Pergunta</a>
<a href="#" class="list-group-item item4" id="4" onclick="recebeResposta( this.id )"><div class="icone4"></div>Resposta 4 da Primeira Pergunta</a> <input type="hidden" name="resposta" id="resposta" value="4" />
</div>
<script>
//$(".list-group-item").click(function() {
//$('.item3').addClass('list-group-item-success');
//});
var qtdCarrinho = $("#resposta").val();
//alert(qtdCarrinho);
function recebeResposta(id){
$('this.id').addClass('list-group-item-success');
}
</script>
</div>
</div>
Hello Luciano! Put your code in the question as text. If we want to give an example is easier and we do not have to write the code by hand.
– Sergio
Edited friend, I’m breaking my head to get the desired result
– Luciano Silva