1
我有一个工作jquery图像旋转木马,我正在建设。它大部分完成(只是增加按钮的作品):http://jsfiddle.net/2C8fy/7/jQuery的图像淡入
我唯一的问题是,当图像被追加它不会淡入。它刚刚出现。我尝试在右侧添加另一个不透明度为0的插槽,然后使其淡入淡出,但似乎也没有效果。我怎样才能让那个正确的插槽图像动起来,让它看起来像是在淡入?这就是我现在所拥有的:
$('#basic_div').animate({ //slides the div with the images in it to the left.
left: '-=40px'
}, 300, function() {
});
left.animate({ //fade out effect for the left most image
opacity: 0
}, 300, function() {
left.remove(); //gets rid of left most image after it becomes invisible.
$('#basic_div').css({
left: '0px' //resets the div that contains the images
});
});
middle.attr('id', 'left_slot'); //changes ids
right.attr('id', 'middle_slot');
$("#basic_div").append(newImgSL);
newImgSL.attr('id', 'right_slot');
newImgSL.animate({
opacity: 100 //I thought this would make it fade in, but it still just appears.
}, 300);