Estoy utilizando este Quiz:
http://nazmulweb.com/Quiz
HTML:
Código HTML:
Ver original
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="css/jquiz.css" rel="stylesheet" /> <!-- HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> </head> <body> <div id="container"> <div class="row"> <ol id="jquiz"> <li> <ul> </ul> </ol> </div> </div> </body> </html>
Código Javascript:
Ver original
/* THIS CODE IS CREATED BY THE FOLKS AT WEBSITEDESIGNERNC.COM GO VISIT FOR ALL YOUR PROGRAMMING AND WEB DESIGN NEEDS! */ $(document).ready(function() { var count = 0; var howmanyquestions = $("#jquiz > li").length; //the function for a clicked item $("#jquiz li ul li").click(function(){ if (!($(this).parent("ul").hasClass("answered"))) { // removes unanswered class and adds answered class so they cannot change answer $(this).parent("ul").addClass("answered"); // runs if they clicked the incorrect answer if (!($(this).hasClass("correct"))) { // puts strike-through wrong answer and makes their answer red for incorrect $(this).addClass("wronganswer"); $(this).siblings(".correct").addClass("realanswer"); // animate explanation & add styling depending on answer $(this).parent().parent().children("div").prepend('<p>INCORRECTO</p>'); $(this).parent().parent().children("div").addClass("wrongbox"); $(this).parent().parent().children("div").fadeTo(500, 1).removeClass("hidden"); } // runs if they clicked the correct answer if ($(this).hasClass("correct")) { //adds one to quiz total correct tally count++; // makes correct answer green $(this).addClass("correctanswer"); // animate explanation & add styling depending on answer $(this).parent().parent().children("div").prepend('<p>CORRECTO</p>'); $(this).parent().parent().children("div").addClass("rightbox"); $(this).parent().parent().children("div").fadeTo(750, 1).removeClass("hidden"); } if ($('ul.answered').length == howmanyquestions) { $('#jquizremarks').fadeIn('slow'); $('#jquiztotal').html('Tienes un '+count+' out of '+howmanyquestions+' en el quiz.'); } } }); });
Yo que necesito que por cada opción me de una explicación distinta.
Opción 1...Explicación 1
Opción 2...Explicación 2
Opción 3...Explicación 3
Opción 4...Explicación 4
Gracias por su ayuda