• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

jQuery UISelectable和Draggable相结合

用户头像
it1352
帮助1

问题说明

我在试图了解jqueryUI的 selectable() draggable()组件如何协同工作时遇到了一个大问题。

I'm having a big problem trying to get my head round how the selectable() and draggable() components of jqueryUI can work together.

他们自己工作正常。我正在尝试创建一个文件浏览器类型界面,用户可以选择多个文件或将 INDIVIDUAL 文件拖到应用程序中的其他可放置位置。我知道很多人一直在寻找拖动多个文件的方法,但目前这不是我的要求。

They work fine on their own. I am trying to create a file browser type interface that users can select multiple files or drag INDIVIDUAL files to other droppable places in the app. I know a lot of people have been looking at ways to drag multiple files but this is not a requirement for me at the moment.

在提供的示例中,如果使用可选择的工作鼠标拖动选框框但不再适用于简单的鼠标单击或crl单击选择多个(启用拖动时)。

In the example provided selectable works if using the mouse drag marquee box but no longer works for simple mouse clicks or crl click to select multiple (when draggable is enabled).

示例:
http://jsbin.com/aguju4/3/edit

正确答案

#1

决定废弃可选插件并自行构建基本版本。这两个似乎并不顺利。我基于live()点击建立了自己的可选解决方案,这样它就不会与可拖动的点击事件冲突。

Decided to scrap the selectable plugin and build a basic version myself. The two don't seem to get on very well. I have based my own selectable solution on live() clicks so that it doesn't conflict with the draggable click events.

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /reply/detail/tanhcfhacb
系列文章
更多 icon
同类精品
更多 icon
继续加载