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);