質問編集履歴
2
文の修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
tableの中のあるカラムに値が入っている行を選択して削除ボタンを押したときに
|
2
|
-
次にあるカラムに値が入っている行までの全ての行を消したいです。
|
2
|
+
次にあるカラムに値が入っている行の1つ前までの全ての行を消したいです。
|
3
3
|
addClassとnextAllを使ってやってみましたが駄目でした。
|
4
4
|
|
5
5
|
分かる方がいましたらお願いします。
|
1
tableの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -5,6 +5,40 @@
|
|
5
5
|
分かる方がいましたらお願いします。
|
6
6
|
```jquery
|
7
7
|
$("#bt-del1).click(function(){
|
8
|
-
$("#
|
8
|
+
$("#tbl1 .cs-selected").nextAll(".collect").remove();
|
9
9
|
});
|
10
|
-
```
|
10
|
+
```
|
11
|
+
```html
|
12
|
+
<script type="text/template" id="tlist1">
|
13
|
+
<thead id="th-list1">
|
14
|
+
<tr>
|
15
|
+
<th class="list1-col1 cs-center">a</th>
|
16
|
+
<th class="list1-col2 cs-center">b</th>
|
17
|
+
<th class="list1-col3 cs-center">c</th>
|
18
|
+
<th class="list1-col4 cs-center">d</th>
|
19
|
+
<th class="list1-col5 cs-center">e</th>
|
20
|
+
<th class="list1-col6 cs-center">f</th>
|
21
|
+
<th class="list1-col7 cs-center">g</th>
|
22
|
+
<th class="list1-col8 cs-center">h</th>
|
23
|
+
<th class="list1-col9 cs-center">i</th>
|
24
|
+
</tr>
|
25
|
+
</thead>
|
26
|
+
<tbody id="tbl1"></tbody>
|
27
|
+
</script>
|
28
|
+
|
29
|
+
<script type="text/template" id="intbl">
|
30
|
+
<tr class="cs-showb cs-pointer" style="height: 35.56px">
|
31
|
+
<td class="list1-col1" data-b1="<%- val1 %>" id="bld1"><%- val1 %></td>
|
32
|
+
<td class="list1-col2" data-b2="<%- val2 %>" id="bld2"><%- val2 %></td>
|
33
|
+
<td class="list1-col3" data-b3="<%- val3 %>" id="bld3"><%- val3 %></td>
|
34
|
+
<td class="list1-col4" data-b4="<%- val4 %>" id="bld4"><%- val4 %></td>
|
35
|
+
<td class="list1-col5" data-b5="<%- val5 %>" id="bld5"><%- val5 %></td>
|
36
|
+
<td class="list1-col6" data-b6="<%- val6 %>" id="bld6"><%- val6 %></td>
|
37
|
+
<td class="list1-col7" data-b7="<%- val7 %>" id="bld7"><%- val7 %></td>
|
38
|
+
<td class="list1-col8" data-b8="<%- val8 %>" id="bld8"><%- val8 %></td>
|
39
|
+
<td class="list1-col9" data-b9="<%- val9 %>" id="bld9"><%- val9 %></td>
|
40
|
+
</tr>
|
41
|
+
</script>
|
42
|
+
```
|
43
|
+
下のようなイメージです
|
44
|
+

|