Javascript jQuery tablednd一起移动两行
我准备了一个JSFIDLE环境,只是为了向您展示我的问题。我想用tablednd jquery插件或其他替代方法将两行(红色的)移到一起 有什么想法吗 我知道我可以在tr/td中嵌套一个表,但随后我松开了与根表对齐的表头宽度td 非常感谢Javascript jQuery tablednd一起移动两行,javascript,jquery,tablednd,Javascript,Jquery,Tablednd,我准备了一个JSFIDLE环境,只是为了向您展示我的问题。我想用tablednd jquery插件或其他替代方法将两行(红色的)移到一起 有什么想法吗 我知道我可以在tr/td中嵌套一个表,但随后我松开了与根表对齐的表头宽度td 非常感谢 <table border="1" id="table-1" cellpadding="5" cellspacing="0" class="grid"> <thead class="header nodrop"> <th no
<table border="1" id="table-1" cellpadding="5" cellspacing="0" class="grid">
<thead class="header nodrop">
<th nowrap style="">Col0</th>
<th nowrap style="">Col1</th>
<th nowrap style="">Col2</th>
<th nowrap style="">Col3</th>
<th nowrap style="">Col4</th>
<th nowrap style="">Col5</th>
<th nowrap style="">Col6</th>
<th nowrap style="">Col7</th>
</thead>
<tbody>
<!-- first row group -->
<tr id="1111" style="background-color:red;">
<td>Text1.0</td>
<td>Text1.1</td>
<td>Text1.2</td>
<td>Text1.3</td>
<td>Text1.4</td>
<td>Text1.5</td>
<td>Text1.6</td>
<td>Text1.7</td>
</tr>
<tr id="1111" style="background-color:red;">
<td colspan="8">this row belongs to ROW ID 1111 above red</td>
</tr>
<!-- second row group -->
<tr id="2222">
<td>Text2.0</td>
<td>Text2.1</td>
<td>Text2.2</td>
<td>Text2.3</td>
<td>Text2.4</td>
<td>Text2.5</td>
<td>Text2.6</td>
<td>Text2.7</td>
</tr>
<tr id="2222">
<td colspan="8">this row belongs to ROW ID 2222 above white</td>
</tr>
</tbody></table>
可乐
可乐
可乐
可乐
可乐
可乐
可乐6
可乐
Text1.0
文本1.1
文本1.2
正文1.3
正文1.4
正文1.5
正文1.6
正文1.7
此行属于红色上方的行ID 1111
Text2.0
文本2.1
文本2.2
文本2.3
文本2.4
文本2.5
文本2.6
文本2.7
此行属于白色上方的ID2222行
我终于解决了
$("#table-1").sortable({
helper: function(e, ui) {
ui.children().each(function() {
$(this).width($(this).width());
});
return ui;
},
items: "tbody"
}).disableSelection();
我终于解决了
$("#table-1").sortable({
helper: function(e, ui) {
ui.children().each(function() {
$(this).width($(this).width());
});
return ui;
},
items: "tbody"
}).disableSelection();