如何使用 jquery 使一堆卡片从一个地方移动到另一个地方
像这样的事情http://www.linkedin.com/
我试过了,但它不起作用:
$( "#img2 li" ).each(function() {
var el = $(this);
// Make it static
el.css({
visibility: 'hidden', // Hide it so the position change isn't visible
position: 'static'
});
// Get the static position
var end = el.position();
// Turn it back to absolute
el.css({
visibility: 'visible', // Show it
position: 'absolute'
}).animate({ // Animate to the static position
top: end.top,
left: end.left
}, function() { // Make it static
$(this).css('position', 'static');
});
});