用法
HTML
<div id="quiz">
<div id="quiz-header">
<h1>jQuery Quiz Plugin</h1>
<p class="faded">A quiz about the plugin built by the plugin.</p>
</div>
<div id="quiz-start-screen">
<p><a href="#" id="quiz-start-btn" class="quiz-button">Start</a></p>
</div>
</div>
JS
$('#quiz').quiz({
questions: [
{
'q': 'A smaple question?',
'options': [
'Answer 1',
'Answer 2',
'Answer 3',
'Answer 4'
],
'correctIndex': 1,
'correctResponse': 'Custom correct response.',
'incorrectResponse': 'Custom incorrect response.'
}
]
});
2017-08-11