jQuery UI - 可拖动/可放置的数据传输未定义

发布于 2024-12-08 05:30:26 字数 391 浏览 2 评论 0原文

这让我抓狂。

请原谅我,但我不会发布完整的代码,因为它(我相信)无关紧要。这背后的原因显然与我的代码有关。我收到以下错误:

可拖放数据传输未定义

所以我决定从以下位置复制源:

http://jqueryui.com/droppable /#photo-manager

我仍然遇到同样的错误。

我正在使用最新的 jQuery UI,其中包含所有包。

有谁知道为什么会发生这种情况,但在 jQuery UI 示例中却不知道?

问候。

This is driving me mad.

Please forgive me but I'm not going to post the full code as it is (I believe) irrelevant. The reason behind this is obviously with my code. I was getting the following error:

draggable / droppable dataTransfer is undefined

So I decided to copy the source from:

http://jqueryui.com/droppable/#photo-manager

and I still get the same error.

I am using the latest jQuery UI with all packages included.

Does anyone know why this happens but not on the jQuery UI example?

Regards.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

他不在意 2024-12-15 05:30:26

要解决此问题,您必须

e.dataTransfer = e.originalEvent.dataTransfer;

在错误行之前添加此行:。
这应该可以解决它。

To solve this problem you must add this line:

e.dataTransfer = e.originalEvent.dataTransfer;

before the error line.
This should fix it.

浪漫之都 2024-12-15 05:30:26
$.event.props.push('dataTransfer');
$.event.props.push('dataTransfer');
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文