-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathexample-8-multiple-answers.html
46 lines (37 loc) · 1.18 KB
/
example-8-multiple-answers.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Example: Multiple Answer</title>
<link rel="stylesheet" href="../dist/css/ysquiz.min.css" />
</head>
<body>
<div class="ysquiz"></div>
<div id="otherWrapper"></div>
<script src="../dist/js/ysquiz.js"></script>
<script>
var myQuestions = [{
question: "What equipment is needed for a volleyball game?",
answers: ["Helmet", "Cleats"],
correct: ["Net", "Volleyball"]
}, {
question: "What is the sixth month of the year?",
answers: ["July", "August", "May", "April"],
correct: "June"
}, {
question: "Fill in the missing number: 24, 31, 38, 45, 52, ?",
answers: ["54", "23", "65", "44"],
correct: "59"
}];
var myQuiz = new ysQuiz(myQuestions);
var otherQuiz = new ysQuiz([], {
wrapper: "#otherWrapper",
title: "Other Quiz",
enumerator: false
});
otherQuiz.addQuestion("What is the sixth month of the year?", ["July", "August", "May", "April"], "June");
otherQuiz.addQuestion("Fill in the missing number: 24, 31, 38, 45, 52, ?", ["54", "23", "65", "44"], "59");
otherQuiz.setup();
</script>
</body>
</html>