Rename HTML attributes referencing poll options

Since now poll question answers have been renamed to poll question
options, using HTML IDs, classes and data attributes named `answer` was
confusing.
This commit is contained in:
Javi Martín
2024-06-13 14:48:03 +02:00
parent 8997ed316c
commit 5fa6db2226
31 changed files with 58 additions and 58 deletions

View File

@@ -4,19 +4,19 @@
initialize: function() {
$(".zoom-link").on("click", function(event) {
var option;
option = $(event.target).closest("div.answer");
option = $(event.target).closest("div.option");
if ($(option).hasClass("medium-6")) {
$(option).removeClass("medium-6");
$(option).addClass("answer-divider");
$(option).addClass("option-divider");
if (!$(option).hasClass("first")) {
$(option).insertBefore($(option).prev("div.answer"));
$(option).insertBefore($(option).prev("div.option"));
}
} else {
$(option).addClass("medium-6");
$(option).removeClass("answer-divider");
$(option).removeClass("option-divider");
if (!$(option).hasClass("first")) {
$(option).insertAfter($(option).next("div.answer"));
$(option).insertAfter($(option).next("div.option"));
}
}
});