✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
// <![CDATA[
$(document).ready(function() {
$("div.que.multichoice").each(function() {
if ($(this).find("#maximumselections").length) {
let maxselect = parseInt($(this).find("#maximumselections").text());
$(this).find("#numberselections").text(maxselect);
let $total = 1;
$(this).find("div.answer input[type=checkbox]").each(function() {
if ($(this).is(":checked")) {
$total++;
}
$(this).on('click', function(event) {
if (!$(this).is(":checked")) {
$total = $total - 1;
$("div.validationerror").remove();
} else if ($total <= maxselect) {
$total = $total + 1;
$("div.validationerror").remove();
} else {
event.preventDefault();
event.stopPropagation();
}
});
});
}
});
});
// ]]>
2. Kies die regte opsies: (2)
Watter TWEE van die volgende is deel van die bestuursfunksies?
2Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!