回答編集履歴

2

.

2022/07/19 23:38

投稿

int32_t
int32_t

スコア20925

test CHANGED
@@ -1,2 +1,4 @@
1
+ > 現状真ん中が未完了のまま3つ目を完了にできる状態ですので、上から順に完了にすることを条件で作成したいと考えています。
2
+
1
3
  cl1() cl2() などの中では、まず `this.closest('.red')` をチェックしてから処理をしましょう。
2
4
 

1

simplify

2022/07/19 23:38

投稿

int32_t
int32_t

スコア20925

test CHANGED
@@ -1,8 +1,2 @@
1
- 各項目には共通のクラスを付けておくと便利です。
2
- ```html
3
- <div id="test1" class="item gray">
4
- <div id="test2" class="item blue">
5
- ```
6
- cl1() cl2() などの中では、まず `this.closest('.item').classList.contains('red')` をチェックしてから処理をしましょう。
1
+ cl1() cl2() などの中では、まず `this.closest('.red')` をチェックしてから処理をしましょう。
7
2
 
8
-