大家好,
我正在使用支持触摸的拖放表排序器插件https://www.jqueryscript.net/table/touch-table-row-sorter.html
上下拖动表格行。
我的问题是在“记录 9”下方拖动“记录 1”列时页面没有滚动。
HTML:
<table id="table3">
<thead>
<tr>
<th colspan="3">handler: "span.sort-handler"</th>
</tr>
</thead>
<tbody>
<tr>
<td>Row 1</td>
<td>Record 1 <span class="sort-handler"></span></td>
<td>Record 1</td>
</tr>
<tr>
<td>Row 2</td>
<td>Record 2 <span class="sort-handler"></span></td>
<td>Record 2</td>
</tr>
<tr>
<td>Row 3</td>
<td>Record 3 <span class="sort-handler"></span></td>
<td>Recrod 3</td>
</tr>
<tr>
<td>Row 4</td>
<td>Record 4 <span class="sort-handler"></span></td>
<td>Record 4</td>
</tr>
<tr>
<td>Row 5</td>
<td>Record 5 <span class="sort-handler"></span></td>
<td>Record 5</td>
</tr>
<tr>
<td>Row 6</td>
<td>Record 6 <span class="sort-handler"></span></td>
<td>Record 6</td>
</tr>
<tr>
<td>Row 7</td>
<td>Record 7 <span class="sort-handler"></span></td>
<td>Record 7</td>
</tr>
<tr>
<td>Row 8</td>
<td>Record 8 <span class="sort-handler"></span></td>
<td>Record 8</td>
</tr>
</tbody>
<tfoot>5
<tr>
<td colspan="3"> </td>
</tr>
</tfoot>
</table>
</div>
查询:
RowSorter("#table3", {
handler: 'span.sort-handler'
});
请检查此 JSFiddle 链接https://jsfiddle.net/ayyanarpms/7sagcu0j/4/
我需要的是这个https://jqueryui.com/resources/demos/draggable/scroll.html