jquery-ui使自动完成列表项可拖动? [英] jquery-ui making autocomplete list item draggable?
问题描述
是否有可能使可自动完成的jquery框中的项目变为可拖动状态?
Is this possible to make item from a autocomplete jquery box draggable ?
示例:将一个项目从一个列表拖到另一个列表(从一个div中选择mp3文件名,然后拖放到另一个(播放列表)中
example : drag an item from one list to another (selecting mp3 files names from one div and drop into another (play list)
推荐答案
可能的是,当某人开始键入内容时,您必须要做的就是在创建项目后附加可拖动对象.我这样做的一种方法是添加open事件(查看何时打开自动完成框),然后选择由自动完成创建的ui-menu-items
并使它们可拖动.可以在此处找到示例:
It is possible, what you have to do is append the draggable after the items are created when someone starts typing. One way I did this was by adding the open event (sees when the autocomplete box is opened) and then I select the ui-menu-items
that are created by autocomplete and I make them draggable. An example can be found here:
这篇关于jquery-ui使自动完成列表项可拖动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!