I'm working on making a quiz with javascript and jquery, but I am totally lost on how to go on. For now I have only created a JSON to save the question in.
Javascript document so far:
// JavaScript Document
(function(){
window.onload = init;
function init(){
}
var points = 0;
var numberofquestions= 0;
var correct= 0;
var quiz= {question: [
{Question: "Question 1?",
answers: [
{answer: "Answer 1", correct_answer: 0},
{answer: "Answer 2", correct_answer: 1},
{answer: "Answer 3", correct_answer: 0}
]}
]};
})();
HTML
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Quiz</title>
<script src="../javascript/quizJS.js"></script>
<link rel="stylesheet" type="text/css" href="../css/stil.css">
</head>
<body>
<div id="wrapper">
<header id="header">
<h1>Quiz</h1>
</header>
<div id="container">
<h2 id="Title"></h2>
<ul class="answer">
</ul>
<section id="navigation">
<button ID="btnPrev">Prev</button>
<button ID="btnNext">Next</button>
</section>
</div>
<footer id="footer">
</footer>
</div>
</body>
</html>
I'm not asking any to do it, but I need help on making any progress. I've tried using Google to find something similar, but it seems so complex and I can't figur out the pattern. Thank you