assets/js/quiz.js
// the functon displays the link to the correct answer
the functon displays the link to the correct answer
the functon displays the link to the correct answer
function showCorrectAnswer1(){
    let showAnswer1 = document.createElement('p')
    showAnswer1.innerHTML = 'Show Corrent Answer'
    showAnswer1.style.position = 'relative'
    showAnswer1.style.top = '-180px'
    showAnswer1.style.fontSize = '1.75rem'
    document.getElementById('showanswer1').appendChild(showAnswer1)
    showAnswer1.addEventListener('click', () => {
      document.getElementById('ans-1').style.border = '3px solid limegreen'
      document.getElementById('result-1').style.color = 'limegreen'
      document.getElementById('result-1').innerHTML = 'Correct!'
      document.getElementById('showanswer1').removeChild(showAnswer1)
    })
  }
function showCorrectAnswer1 ( ) { let showAnswer1 = document . createElement ( 'p' ) showAnswer1 . innerHTML = 'Show Corrent Answer' showAnswer1 . style . position = 'relative' showAnswer1 . style . top = '-180px' showAnswer1 . style . fontSize = '1.75rem' document . getElementById ( 'showanswer1' ) . appendChild ( showAnswer1 ) showAnswer1 . addEventListener ( 'click' , ( ) => { document . getElementById ( 'ans-1' ) . style . border = '3px solid limegreen' document . getElementById ( 'result-1' ) . style . color = 'limegreen' document . getElementById ( 'result-1' ) . innerHTML = 'Correct!' document . getElementById ( 'showanswer1' ) . removeChild ( showAnswer1 ) } ) }
the functon displays the link to the correct answer
the functon displays the link to the correct answer