通过拖动鼠标创建可拖动对象
我是 JQuery 库的新手。我目前正在尝试通过鼠标创建一个 Draggable 。比如说,当我按下鼠标时,它开始绘制,然后拖动鼠标来更改大小,然后释放鼠标来完成绘制。
用 JQuery 可以做到这一点吗?
I am new to JQuery library. I am currently trying to create a Draggable by mouse. Say, when I press the mouse it start to draw and then I drag the mouse to change the size and then I release the mouse to finalize the drawing.
Is it possible to do this with JQuery?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
很难准确理解你在问什么。
如果您对拖放感兴趣,请查看此处:
http://jqueryui.com/demos /draggable/#visual-feedback
这是 jQuery UI,它是 jQuery 的库,提供了许多有趣的 UI 小部件(请在此处查看更多内容:http://jqueryui.com/demos/)
It is difficult to understand exactly what you are asking.
If your are interested in drag and drop, look here:
http://jqueryui.com/demos/draggable/#visual-feedback
This is jQuery UI, which is a library for jQuery, that provides many interesting UI widgets (see more here: http://jqueryui.com/demos/)
这似乎符合您的要求: http://jsbin.com/azare
这很粗糙,但是嘿。
This appears to do what you asked: http://jsbin.com/azare
It's rough, but hey.