$(".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'});
}
}});
我正在尝试更改拖动克隆项目的大小,当我将鼠标悬停在可放置区域上但保留原始大小相同时(以便当鼠标悬停在正确的放置区域时,附加到鼠标的项目会缩小)。此代码更改原始但不更改克隆。有什么建议?
答案 0 :(得分:3)
$( ui.helper).css({width:'30px',height:'30px'});