jQuery UI Sortable-连接项为空时的connectWith困难 [英] jQuery UI Sortable - connectWith difficulties when connected item is empty

查看:91
本文介绍了jQuery UI Sortable-连接项为空时的connectWith困难的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在页面上有几个可排序的表.它们中的大多数已连接,但只能将其拖出,但不能拖出.我似乎无法将项目拖到这些空表之一中.

I have several sortable tables on a page. Most of them are connected but one is only able to be dragged out of, but not to. I can't seem to drag items into one of these tables that is empty.

这是一个jsFiddle: http://jsfiddle.net/jasonbutz/ZLzU3/2/

Here is a jsFiddle: http://jsfiddle.net/jasonbutz/ZLzU3/2/

此外,隐藏<tr>似乎无济于事.

Also, having a hidden <tr> doesn't seem to help anything.

推荐答案

将可排序表的主体与已连接的列表/表一起使用时,jQuery UI可排序似乎有麻烦.另一种实现方法是将表本身设置为可排序的容器,并设置哪个items是可排序的,在这种情况下,我们只希望trtbody中而不在thead中.这是工作示例: http://jsfiddle.net/ZLzU3/62/

Jquery UI sortable seems to have trouble when using sortable table's body with connected list/table. The other way to achieve that is you set the table itself as the container for the sortable and set which items are sortable, in this case we only want the tr in the tbody and not in the thead. Here's the working example: http://jsfiddle.net/ZLzU3/62/

这篇关于jQuery UI Sortable-连接项为空时的connectWith困难的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆