[英]Conflict between bootstrap and interact.js
I am trying to use the interact.js
plugin for drag&drop with bootstrap. 我正在尝试使用interact.js
插件通过引导程序进行拖放。 That works but when I put a draggable box in a nav it stops working. 那行得通,但是当我将可拖动框放到导航栏中时,它便停止工作。
For better understanding: https://jsfiddle.net/4ddoqcpj/ 为了更好的理解: https : //jsfiddle.net/4ddoqcpj/
"Beat-TEST" works well but the other (in the nav) fall and won't stay in the dragzone. “ Beat-TEST”效果很好,但是另一个(在导航栏中)下降并且不会停留在拖动区中。
Can anyone help me ? 谁能帮我 ? Please! 请! That for school but my teacher doesn't know how to use bootstrap and all... 那是在学校,但是我的老师不知道如何使用引导程序和所有...
First off you have this configuration: 首先,您具有以下配置:
accept: '#yes-drop',
Usually id's are used only once on the page, you have multiple elements with the same id. 通常,ID在页面上仅使用一次,您有多个具有相同ID的元素。 I recommend accepting the .draggable
class. 我建议接受.draggable
类。
Now for the problem, you specify restriction: "parent"
in the configuration. 现在针对问题,在配置中指定restriction: "parent"
。 If you remove that the other elements can be dropped like you expect. 如果删除,则可以按预期删除其他元素。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.