[英]Drag and drop cells on CSS Grid only work moving the cell to the right, they won't drop going to the left
[英]Drag and drop cells vertically in a grid
|-----------------|----------------------|
| 10th of May | Cleaning kitchen |
|-----------------|----------------------|
| 17th of May | Cleaning living |
| | room and the |
| | basement |
|-----------------|----------------------|
| 24 th of May | Cleaning balcony |
|-----------------|----------------------|
我有两列。
第二列中的项目应垂直拖动,以彼此更改位置(每行/日期不超过一个项目)。
第一栏中的项目不应垂直更改位置。
我应该考虑哪种解决方案,并且还要考虑相邻像元的高度?
您可以看到这个小提琴: http : //jsfiddle.net/T6A2B/1/
使用Jquery sortable和connectWith选项:
$(function() {
$( ".draggable" ).sortable({
connectWith: ".draggable"
}).disableSelection();
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.