mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-24 03:16:40 +00:00
Fix quiz interractivity
This commit is contained in:
@@ -20,8 +20,11 @@ define([
|
||||
|
||||
$quiz.find(".question").each(function(q) {
|
||||
var result = true;
|
||||
var $answers = $quiz.find(".question-answers").slice(q).find("input[type=radio], input[type=checkbox]");
|
||||
$(this).find("input[type=radio],input[type=checkbox]").each(function(i) {
|
||||
|
||||
var $questions = $(this).find(".question-content").find("input[type=radio], input[type=checkbox]");
|
||||
var $answers = $(this).find(".question-answers").find("input[type=radio], input[type=checkbox]");
|
||||
|
||||
$questions.each(function(i) {
|
||||
var correct = $(this).is(":checked") === $answers.slice(i).first().is(":checked");
|
||||
result = result && correct;
|
||||
if (!correct) {
|
||||
|
||||
Reference in New Issue
Block a user