0

The 'next' button gets a hidden class applied to it after its clicked. It works on desktop and androids but not on iOS (or Safari I think?)

JS

function submitQuizAnswer() {
$('#submit-answer').on('click touch', function(event){
  event.preventDefault();
  evaluateAnswers();
  $('#submit-answer').addClass('hidden');
  $('#next-question').removeClass('hidden');
  $('input[type=radio]').attr('disabled', true);

});
  }

function advanceToNextQuestion() {
  $('#next-question').on('click touch', function(event) {
    if (currentQ < quizArray.length-1) {
      currentQ++;
      renderQuestions();
      resetQuestion();
    } else {
      showFinalScore();
    } 
  });
}

  function resetQuestion() {
    $('input[type=radio').attr('disabled', false);
    $('#next-question').addClass('hidden');
    $('#submit-answer').removeClass('hidden');
    $('#feedbackcorrect').addClass('hidden');
    $('#feedbackincorrect').addClass('hidden');
    $('.wrong-answer').addClass('hidden');
    $('#submit-answer').addClass('disabled');
    $('#submit-answer').attr('disabled', 'disabled');
  }
pillgrumm
  • 1
  • 1
  • possible duplicate: https://stackoverflow.com/questions/3025348/how-do-i-use-jquery-for-click-event-in-iphone-web-application – Akber Iqbal Oct 05 '18 at 06:37
  • Try and add this css to the clicked element: `cursor: pointer;`. If that doesn't work, try to listen for touchstart and touchend events. More is described in @AIqbal's link above. – Martin Oct 05 '18 at 07:01
  • Will do! That element is already in my CSS; i'll see what I can figure out in Alqbal's link though. – pillgrumm Oct 05 '18 at 07:06

0 Answers0