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:
cap-dev0x 2024-02-05 05:30:01 -08:00 committed by GitHub
parent ad0286d5ba
commit dd0f135088
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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) + ".&nbsp;" + 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>';
});