[英]jquery ui sortable get table tr grouped
i have some problems with my table i have this table for egs 我的桌子有问题我有这个桌子,例如
<tr style="">
<td>1</td>
<td>item 1</td>
</tr>
<tr style="">
<td>1.1</td>
<td>item 1.1</td>
</tr>
<tr style="">
<td>1.2</td>
<td>item 1.2</td>
</tr>
<tr style="">
<td>1.1.1</td>
<td>item 1.1.1</td>
</tr>
i use jquery ui sortable but the problem is that if i want to move the item 1 the item1.2 and item 1.1.1 will also follow something like a group 我使用jQuery ui sortable,但问题是,如果我想移动项目1,则item1.2和item 1.1.1也将遵循类似组的方式
fiddle link http://jsfiddle.net/kN2XL/ 小提琴链接http://jsfiddle.net/kN2XL/
You should have a look at nestedSortable to implement this kind of functionality. 您应该查看nestedSortable,以实现这种功能。 Example
例
Unfortuately, you will however need to change your html from tables into a hierarchy, like <ul>
<li>
etc. 不幸的是,您将需要将HTML从表更改为层次结构,例如
<ul>
<li>
等。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.