fix(quiz): use $ instead of jQuery which is undefined (#1736)
Fixes: #1703 Signed-off-by: cap-dev0x <158111888+cap-dev0x@users.noreply.github.com>
This commit is contained in:
parent
ad0286d5ba
commit
dd0f135088
@ -20,11 +20,11 @@ $(function () {
|
||||
let questionsJson = json;
|
||||
var questionsObj = JSON.parse(questionsJson);
|
||||
let html = "";
|
||||
jQuery.each(questionsObj, function(i, obj) {
|
||||
jQuery.each(obj, function(j, quest) {
|
||||
$.each(questionsObj, function(i, obj) {
|
||||
$.each(obj, function(j, quest) {
|
||||
html += "<div id='question_" + j + "' class='quiz_question' name='question'><p>" + (j+1) + ". " + quest.text + "</p>";
|
||||
html += "<fieldset>";
|
||||
jQuery.each(quest.solutions, function(k, solution) {
|
||||
$.each(quest.solutions, function(k, solution) {
|
||||
solution = "Solution " + k + ": " + solution;
|
||||
html += '<input id="question_' + j + '_' + k + '_input" type="radio" name="question_' + j +'_solution" value="' + solution + '" required><label for="question_' + j + '_' + k + '_input">' + solution + '</label><br>';
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user