質問編集履歴
1
インデントの変更を行いました
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
|
-
|
157
|
+
var pre_element = null;
|
158
|
-
|
158
|
+
|
159
|
-
|
159
|
+
var col_num = 0;
|
160
|
-
|
160
|
+
|
161
|
-
|
161
|
+
$(this).find('tr').each(
|
162
|
+
|
162
|
-
|
163
|
+
function () {
|
164
|
+
|
163
|
-
|
165
|
+
var now_th = $(this).find('td').eq( col_num );
|
164
|
-
|
166
|
+
|
165
|
-
|
167
|
+
if (pre_element === null) {
|
166
|
-
|
168
|
+
|
167
|
-
|
169
|
+
pre_element = now_th;
|
168
|
-
|
170
|
+
|
169
|
-
|
171
|
+
} else if (now_th.text() === pre_element.text()) {
|
170
|
-
|
172
|
+
|
171
|
-
|
173
|
+
now_th.remove();
|
172
|
-
|
174
|
+
|
173
|
-
|
175
|
+
if (pre_element.attr('rowspan') === null)
|
176
|
+
|
174
|
-
|
177
|
+
pre_element.attr('rowspan', 1);
|
178
|
+
|
175
|
-
|
179
|
+
pre_element.attr('rowspan', parseInt(pre_element.attr('rowspan'),10) + 1);
|
176
|
-
|
180
|
+
|
177
|
-
|
181
|
+
} else {
|
178
|
-
|
182
|
+
|
179
|
-
|
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
|
|