jQuery UI drop on empty container/list not working

前端 未结 4 1615
野趣味
野趣味 2020-12-18 06:21

I have a problem with the jQuery UI sortable widget. I simply can\'t drop any item on an empty container. When the container has an item it works perfectly. I call the widg

4条回答
  •  粉色の甜心
    2020-12-18 07:04

    Check carefully for the width of your ul after the ul is empty And when your ul is empty there is no width and as a result, you cannot drop li over it. You can check the width of ul by applying a border. The solution is only applied width to your all ul and the problem will be sorted. eg: .droptrue{width: 100%} (.droptrue is my ul)

提交回复
热议问题