我对动画方法有问题。
<div id="containment">
<div id="child1">C1</div>
<div id="child2">C2</div>
<div id="child3">C3</div>
</div
$("#containment > div").bind("dragstop", function(event, ui) {
var size = $.extend({}, $("#containment").data("originalSize"));
$.each($("#containment > div"), function(index, d) {
width = parseInt($(d).css("left"), 10) + parseInt($(d).outerWidth(), 10);
height = parseInt($(d).css("top"), 10) + parseInt($(d).outerHeight(), 10);
size.width = (width > size.width) ? (width + 50) : size.width;
size.height = (height > size.height) ? (height + 50) : size.height;
});
$("#containment").animate({
width: size.width,
height: size.height
}, 'slow');
});
问题是,当dragstop被触发时,我移出的子对象将被隐藏,并且只有在“包含”动画结束时才会出现。
谢谢