JqueryUI排序滚动问题 [英] JqueryUI Sortable scrolling issue

查看:120
本文介绍了JqueryUI排序滚动问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将 #items 初始化为jqu​​ery sortable,以使项目列表可排序。

#items 是父div #content 的子div。

I have initialized #items as jquery sortable, to make item list sortable.
#items is a child div of a parent div #content.

父div #content 的最大高度设置为40%,并允许滚动溢出。这里是css:

The parent div #content has a max-height set 40%, and is allowed to scroll in case of overflow. Here is the css:

#content {//parent-div
    border-right: 1px solid #c8c8c8;
    height: 40%;
    max-height: 40%;
    overflow-y: auto;
    position: relative;
}

这里是子div的css #items

Here is the css for child div #items:

#items {
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

每当我尝试以 Item1

这里是

Here is the JSFiddle .

如何制作 #items 滚动?

推荐答案

问题是, 溢出属性对你的可排序 #items ,这似乎阻止ui做的东西。

The issue is that you're specifying overflow properties on your sortable #items, which seems to be preventing ui from doing it's on thing.

#items {
 /* remove these
  overflow-x: hidden;
  overflow-y: auto; */
  position: relative;
  padding: 20px;
}

更新小提琴

这篇关于JqueryUI排序滚动问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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