I followed everything in my professor’s step but the ‘integrity’ of my jquery says its blocked.
<section class="q-n-a">
<h3 class="questions">What kind of animal can you reflect yourself in the choices below?</h3>
<div class="answers">
<div class="answer" data-value="1">Tiger</div>
<div class="answer" data-value="2">Dog</div>
<div class="answer" data-value="3">Bird</div>
<div class="answer" data-value="4">Fish</div>
<div class="answer" data-value="5">Lion</div>
</div>
<div class="button-holder"> </div>
</section>
<div class="button finish">What color am I?</div>
<script src="https://code.jquery.com/jquery-3.5.0.min.js" integrity="sha256-xNzN2a4ltkB44Mc/
Jz3pT4iU1cmeR0FkXs4pru/JxaQ=" crossorigin="anonymous"></script>
<script type="text/javascript">
var questions = $('.question').length;
var total = 0;
var avg = 0;
$('.answer').on('click', function(){
$(this).addClass('selected');
total += $(this).data('value');
console.log(total);
})
</script>
Does my sources incorrected?
But it appears in my prof that there is no error or blocked source.