回答編集履歴

2

追記

2016/07/19 09:16

投稿

shi_ue
shi_ue

スコア4437

test CHANGED
@@ -9,3 +9,17 @@
9
9
  });
10
10
 
11
11
  ```かな?
12
+
13
+
14
+
15
+ 追記
16
+
17
+ ---
18
+
19
+ eachなしで。
20
+
21
+ ```javascript
22
+
23
+ $(".form-list").children("li:first-child").children("input").prop("checked",true);
24
+
25
+ ```

1

変更

2016/07/19 09:15

投稿

shi_ue
shi_ue

スコア4437

test CHANGED
@@ -1,8 +1,10 @@
1
+ 先ほどの取り消し。
2
+
1
3
  ```javascript
2
4
 
3
- $(".form-list li:first input").each(function(){
5
+ $(".form-list").each(function(){
4
6
 
5
- $(this).prop('checked',true);
7
+ $(this).children("li:first").children("input").prop("checked",true);
6
8
 
7
9
  });
8
10