【发布时间】:2015-11-16 13:12:23
【问题描述】:
$(".drag").draggable({
helper: 'clone',
appendTo: "body"
});
$( ".drop" ).droppable({
over: function(event, ui) {
$(ui.draggable).css({width:'30px',height:'30px'});
},
drop: function( event, ui ) {
if($(ui.draggable).parent() !==$(this)){
$(ui.draggable).appendTo($( this ));
$(ui.draggable).tooltip({ disabled: true });
$(ui.draggable).css({float:'left'});
}
}});
当我将鼠标悬停在可放置区域上时,我试图更改拖动的克隆项目的大小,但保持原来的大小相同(这样当我在正确的放置区域上时,附加到鼠标的项目会缩小)。此代码更改原始但不更改克隆。有什么建议么?
【问题讨论】:
-
你能把你的html代码贴在这里吗?
标签: jquery drag-and-drop hover height width