Created
December 8, 2011 16:25
-
-
Save sydlawrence/1447497 to your computer and use it in GitHub Desktop.
For Tez
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<link rel="stylesheet" type="text/css" href="style.css"> | |
<script type="text/javascript" src="scripts/jquery.js"></script> | |
<script type="text/javascript" src="scripts/jQuizMe.js"></script> | |
<script type="text/javascript"> | |
/* | |
I have no idea what this does / is meant to do | |
*/ | |
var mcqimg = new Image(); | |
mcqimg.src = "images1.JPG"; | |
function image1(){ | |
if (document.images) { | |
document["imagename"].src = mcqimg.src | |
} | |
} | |
/* | |
End of confusion | |
*/ | |
</script> | |
</head> | |
<body> | |
<div id="header"></div> | |
<div id="content"> | |
<div id="quizArea"/> | |
<script type="text/javascript"> | |
$( function($){ | |
var quizMulti = { | |
multiList:[ | |
/* Core Questions */ | |
{ | |
ques: "Question1", | |
ans: "right answer", | |
ansSel : [ | |
"wrong answer1", | |
"wrong answer2", | |
"wrong answer3" | |
], | |
image: "image1.jpg" | |
}, | |
{ | |
ques: "Question2", | |
ans: "right answer", | |
ansSel : [ | |
"wrong answer1", | |
"wrong answer2", | |
"wrong answer3" | |
], | |
image: "image2.jpg" | |
}, | |
{ | |
ques: "Question3", | |
ans: "right answer", | |
ansSel : [ | |
"wrong answer1", | |
"wrong answer2", | |
"wrong answer3" | |
], | |
image: "image3.jpg" | |
}, | |
// this comma at the end will break in ie (if that is a concern) | |
] | |
}; | |
// create a new function to process a question | |
function testQuestion(question) { | |
alert("The question is: " + question.ques); | |
alert("The image is: " + question.image); | |
} | |
// demo testQuestion | |
var question = quizMulti.multiList[0]; | |
testQuestion(question); | |
}); | |
</script> | |
</body> | |
</html> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment