回答編集履歴
1
記述ミス
answer
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
const $target = document.querySelector('.js-target')
|
|
12
12
|
|
|
13
13
|
$target.addEventListener('click', () => {
|
|
14
|
-
if ($target.classList.contains("
|
|
14
|
+
if ($target.classList.contains("is-active")) {
|
|
15
15
|
$target.classList.remove("is-active")
|
|
16
16
|
} else {
|
|
17
17
|
$target.classList.add("is-active")
|