我想将宽度为60px(ccarcellbook)的div放到宽度为20px(ccarcell)的3个div上。 有基本的功能,以便大div替换一个小div, 但不知道如何更换3个小div
jquery的
$('.ccarcellbook').draggable({
helper:"clone",
cursor: "move",
snap:'.ccarcell',
snapMode:'inner'
});
$('.ccarcell').droppable({
over: function(event, ui) {var $this = $(this)},
drop:function(event, ui) {
ui.draggable.detach().appendTo($(this));
}
});
HTML
<div class="ccarcell"></div>
<div class="ccarcell"></div>
<div class="ccarcell"></div>
<div class="ccarcellbook>DRAG ME</div>
<div class="ccarcell"></div>
<div class="ccarcell"></div>
<div class="ccarcell"></div>
欢迎任何建议