Use of toggleClass

This commit is contained in:
Vlyan
2021-01-19 20:18:15 +01:00
parent 71a3af85dd
commit 8fbf7f9005
4 changed files with 6 additions and 4 deletions

View File

@@ -165,7 +165,7 @@ export class TwentyQuestionsDialog extends FormApplication {
event.stopPropagation();
const elmt = $(event.currentTarget).data("toggle");
const tgt = html.find("." + elmt);
tgt.hasClass("toggle-active") ? tgt.removeClass("toggle-active") : tgt.addClass("toggle-active");
tgt.toggleClass("toggle-active");
});
// BT Next