【发布时间】:2010-07-11 18:28:44
【问题描述】:
我正在使用此脚本为锚点内的一些图像设置动画:
$('#locations a').each(function() {
// set opacity 0 take initial position
$(this).css('opacity', '0');
var left = $(this).css('left');
var top = $(this).css('top');
// reset position and animate
$(this).css({'left' : '0', 'top' : '0'});
$(this).animate({left: left, top: top, opacity: 1});
});
我需要使用 jquery each() 函数来获取初始位置。 但是,我想按顺序为返回的元素设置动画。这可能吗?
【问题讨论】:
标签: javascript jquery queue sequence jquery-animate