1
我在使用jQuery動畫的my site的介紹中遇到了一個奇怪的問題。我使用views/drupal加載內容,並將顯示設置爲none。然後我想淡入每一行。jQuery動畫不透明在IE中不起作用
所有瀏覽器中的所有工作都很好,但IE中沒有...有人知道爲什麼嗎?
jQuery('.view-intro').find('.views-row-1')
.css('display','block')
.animate({opacity: 1.00}, time_short, 'swing')
.animate({opacity: 1.00}, time_long, 'linear')
.animate({opacity: 0.00}, time_short, 'swing', function(){
jQuery('.view-intro').find('.views-row-1').css('display','none')
jQuery('.view-intro').find('.views-row-2')
.css('display','block')
.animate({opacity: 1.00}, time_short, 'swing')
.animate({opacity: 1.00}, time_long, 'linear')
.animate({opacity: 0.00}, time_short, 'swing', function(){
jQuery('.view-intro').find('.views-row-2').css('display','none')
jQuery('.view-intro').find('.views-row-3')
.css('display','block')
.animate({opacity: 1.00}, time_short, 'swing')
.animate({opacity: 1.00}, time_long, 'linear')
.animate({opacity: 0.00}, time_short, 'swing', function(){
jQuery('.view-intro').find('.views-row-3').css('display','none')
jQuery('.view-intro').css('display', 'none')
jQuery('.view-collections').animate({opacity: 1, paddingLeft: 0}, time_short, 'swing')
})
})
})
你試過用'.fadeIn()'和'.fadeOut()'來代替嗎? jQuery應該在這裏處理跨瀏覽器問題。你也可以使用'.show()'和'.hide()'(甚至'.toggle()')來代替使用'.css('display',' – m90 2012-03-15 13:23:12