質問編集履歴

1

インデントの変更を行いました

2016/07/04 05:32

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -152,40 +152,46 @@
152
152
 
153
153
  $(document).ready(function(){
154
154
 
155
-  $('#ListTable').each(function () {
155
+  $('#ListTable').each(function () {
156
-
156
+
157
-   var pre_element = null;
157
+ var pre_element = null;
158
-
158
+
159
-   var col_num = 0;
159
+ var col_num = 0;
160
-
160
+
161
-   $(this).find('tr').each(function () {
161
+ $(this).find('tr').each(
162
+
162
-
163
+ function () {
164
+
163
-    var now_th = $(this).find('td').eq( col_num );
165
+ var now_th = $(this).find('td').eq( col_num );
164
-
166
+
165
-    if (pre_element === null) {
167
+ if (pre_element === null) {
166
-
168
+
167
-     pre_element = now_th;
169
+ pre_element = now_th;
168
-
170
+
169
-    } else if (now_th.text() === pre_element.text()) {
171
+ } else if (now_th.text() === pre_element.text()) {
170
-
172
+
171
-     now_th.remove();
173
+ now_th.remove();
172
-
174
+
173
-     if (pre_element.attr('rowspan') === null) pre_element.attr('rowspan', 1);
175
+ if (pre_element.attr('rowspan') === null)
176
+
174
-
177
+ pre_element.attr('rowspan', 1);
178
+
175
-      pre_element.attr('rowspan', parseInt(pre_element.attr('rowspan'),10) + 1);
179
+ pre_element.attr('rowspan', parseInt(pre_element.attr('rowspan'),10) + 1);
176
-
180
+
177
-     } else {
181
+ } else {
178
-
182
+
179
-      pre_element = now_th;
183
+ pre_element = now_th;
180
-
184
+
181
-     }
185
+ }
182
-
186
+
183
-   });
187
+ });
184
-
188
+
185
-  });
189
+  });
186
190
 
187
191
  });
188
192
 
193
+
194
+
189
195
  ```
190
196
 
191
197