It expects jQuery, which, in 3.9 loads at the bottom.
-
You can fix this in /lib/view/WpProQuiz_View_FrontQuiz.php
By wrapping line 68 script with a load event. Hacky, but it works!
window.addEventListener('load', function() { jQuery(document).ready(function($) { $('#wpProQuiz_<?php echo $this->quiz->getId(); ?>').wpProQuizFront({ quizId: <?php echo (int)$this->quiz->getId(); ?>, mode: <?php echo (int)$this->quiz->getQuizModus(); ?>, globalPoints: <?php echo (int)$quizData['globalPoints']; ?>, timelimit: <?php echo (int)$this->quiz->getTimeLimit(); ?>, resultsGrade: <?php echo $resultsProzent; ?>, bo: <?php echo $bo ?>, qpp: <?php echo $this->quiz->getQuestionsPerPage(); ?>, catPoints: <?php echo json_encode($quizData['catPoints']); ?>, formPos: <?php echo (int)$this->quiz->getFormShowPosition(); ?>, lbn: <?php echo json_encode(($this->quiz->isShowReviewQuestion() && !$this->quiz->isQuizSummaryHide()) ? __('Quiz-summary', 'wp-pro-quiz') : __('Finish quiz', 'wp-pro-quiz')); ?>, json: <?php echo json_encode($quizData['json']); ?> }); }); }, false);
[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
- The topic ‘It expects jQuery, which, in 3.9 loads at the bottom.’ is closed to new replies.