回答編集履歴

1

修正

2021/11/30 07:51

投稿

hatena19
hatena19

スコア33740

test CHANGED
@@ -1,6 +1,6 @@
1
1
  下記でどうでしょう。
2
2
 
3
-
3
+ ※印の3行追加しました。
4
4
 
5
5
 
6
6
 
@@ -16,9 +16,9 @@
16
16
 
17
17
  var index = $(this).index();
18
18
 
19
- if($(this).prop("tagName") === "TH"){++index} //
19
+ if($(this).prop("tagName") === "TH"){++index} //
20
20
 
21
- if(index === 0){return}
21
+ if(index === 0){return} // ※
22
22
 
23
23
  $(this).closest('table').find('tr').each(function () {
24
24
 
@@ -42,7 +42,7 @@
42
42
 
43
43
  var index = $(this).index();
44
44
 
45
- if($(this).prop("tagName") === "TH"){++index};
45
+ if($(this).prop("tagName") === "TH"){++index} // ※
46
46
 
47
47
  $(this).closest('table').find('tr').each(function () {
48
48