JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- saved from url=(0067)http://jquizme.googlecode.com/hg/HowToDemos/statusUpdate-demo2.html -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>jQuizMe StatusUpdate Demo 2 - by Larry Battle</title>
<link rel="stylesheet" type="text/css" href="http://jquizme.googlecode.com/hg/releases/pre-release%20of%20jQuizMe%202.2%20fixed/jQuizMe-2.2.css">
</head>
<body><div style="position: fixed; top: 0px; left: 0px; height: 0px; width: 0px; z-index: 9999999; "><div style="position: fixed; top: 100%; height: 0px; "><div style="position: relative; "></div></div></div>
<a href="http://code.google.com/p/jquizme/wiki/statusUpdate">Back to statusUpdate wiki</a><br>
<p>Using jQuery <span id="jqueryVersion">1.4.4</span> and jQuizMe <span id="jQuizMeVersion">2.2</span></p>
<h2>jQuizMe StatusUpdate Demo 4</h2>
<h2>Example:</h2>
<div id="quizArea"></div>
<h2 id="score"></h2>
<script type="text/javascript" src="http://jquizme.googlecode.com/hg/releases/pre-release%20of%20jQuizMe%202.2%20fixed/jquery-1.4.4.js"></script>
<script type="text/javascript" src="http://jquizme.googlecode.com/hg/releases/pre-release%20of%20jQuizMe%202.2%20fixed/jQuizMe-2.2.js"></script>
</body></html>
JavaScript
$( function($){
var quiz = [
{
ques: "Silver", //question
ans: "Ag", // answer
ansInfo : "<br/>More info <a href='http://www.periodictable.com/Elements/079/index.html'>here</a>" // answer information.
},
{
ques: "Gold.",
ans: "Au",
ansInfo : "Gold-Au <br/>More info <a href='http://www.periodictable.com/Elements/079/index.html'>here</a>"
}
];
var options = {};
options.statusUpdate = function( quizInfo, $quiz ){
// The page will be redirect to a google if there is more than one question right on quit.
if( !quizInfo.hasQuit ){
$( "#score" ).text( "Score: "+ quizInfo.score );
}
};
$( "#quizArea" ).jQuizMe( quiz, options );
// Display version information.
$( "#jqueryVersion" ).text( $.fn.jquery );
$( "#jQuizMeVersion" ).text( $.fn.jQuizMe.version );
});