【发布时间】:2017-04-18 10:23:45
【问题描述】:
我遇到了问题,当我将外部视频 div 拖放到时间轴中时,它不再可拖动
https://fiddle.jshell.net/surjitsidhu/pzmzc2z7/2/show/
https://fiddle.jshell.net/surjitsidhu/pzmzc2z7/2
我不确定,为什么会结冰
【问题讨论】:
标签: jquery-ui drag-and-drop jquery-ui-draggable
我遇到了问题,当我将外部视频 div 拖放到时间轴中时,它不再可拖动
https://fiddle.jshell.net/surjitsidhu/pzmzc2z7/2/show/
https://fiddle.jshell.net/surjitsidhu/pzmzc2z7/2
我不确定,为什么会结冰
【问题讨论】:
标签: jquery-ui drag-and-drop jquery-ui-draggable
您的代码似乎缺少可拖动的。
查看此代码:
if( dropped.attr( 'id' ) === 'galleryItem' ) {
//alert("dropped if");
var newEl = $( dropped ).clone().appendTo( droppedOn );
newEl.removeAttr( 'id' ).removeClass( 'thumb' ).html( '<div style="background:red;width:400px;height:50px;"></div>' ).addClass( 'layer-item' );
newEl.removeClass( 'dragging' );
newEl.addClass("item");
$(".item").removeClass("ui-draggable draggable");
$(".item").draggable({
cursor: 'move',
});
} else {
//alert("dropped else");
$( dropped ).detach().css( { top: 0, left: ui.helper.position().left - 160 } ).appendTo( droppedOn );
}
【讨论】: