jQuery:可排序项目的问题:无法放入空列表 [英] jQuery: problem with sortable items: can't be dropped onto empty lists

查看:100
本文介绍了jQuery:可排序项目的问题:无法放入空列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个示例双清单项目: http://jsfiddle.net/xhdUW/

Here is an example double list thing: http://jsfiddle.net/xhdUW/

如果父列表之一已经包含内容,则列表项将在父列表之间轻松转移.但是,如果父列表之一为空,则列表项将不会进入空父列表.

If one of the parent lists already has content, the list items will transfer between the parent lists easily. But if one of the parent lists is empty, the list items will not go into the empty parent list.

.sortable上的文档说默认情况下应启用到空列表的传输: http: //jqueryui.com/demos/sortable/#empty-lists ,即使我指定dropOnEmpty:true,我也会得到相同的行为.

The docs on .sortable say that transferring to empty lists should be enabled by default: http://jqueryui.com/demos/sortable/#empty-lists , though, even when I specify dropOnEmpty: true, I get the same behavior.

推荐答案

您的空列表没有高度,也没有垂直填充. 尝试从列表中添加一些内容:
padding-top
padding-bottom
最小高度

Your empty list have no height and no vertical padding. Try to add something from list:
padding-top
padding-bottom
min-height

这篇关于jQuery:可排序项目的问题:无法放入空列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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