拖放没有JQuery UI [英] Drag and drop without JQuery UI

查看:114
本文介绍了拖放没有JQuery UI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我搜索了很多,找到一个拖放教程随着jQuery单独使用(没有UI),但是由于JQuery UI的普及,所有拖放功能都基于JQuery UI。

I searched a lot to find a tutorial for drag & drop with jQuery alone (without UI), but due to the popularity of JQuery UI, all drag and drop features are based on JQuery UI.

任何人都可以给我一个提示如何使一个基本的Drag&删除JQuery独立?

Can anyone give me a hint how to make a basic Drag & Drop by JQuery standalone?

推荐答案

我认为一个好的起点可能是映射出来的过程,然后决定哪个jQuery工具您将需要为每个用户操作使用。

I think a good starting place might be to map out the process, and then decide which jQuery tools you will need to use for each user action.

所以用户进程可能是:


  • 点击可拖动区域上的内容div

  • 拖动内容,将内容保留在该div

  • 中鼠标,将内容放入可放置容器中,这将调整以前内容的大小以适应可放置大小

需要以下类型的事件监听器:

which needs the following types of event listeners:


  • mouseup

  • mousedown

  • 动画

至少。另一个选择可能是查看jQuery UI源代码,看看它们是如何做到的!哪个会告诉你究竟该怎么做,但是你可以添加它或修剪必要的。

At the very least. Another option might be to check out the jQuery UI source, and see how they do it! Which will tell you exactly what to do but you can add to it or trim where necessary.

这篇关于拖放没有JQuery UI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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