2014-01-23 33 views
0

任何人都可以幫助我鍛鍊爲什麼這不在IE中工作? 我有一個產品鏡頭,當翻動動畫時減輕了它下面的更多信息。 這適用於所有其他瀏覽器只是不是IE < 7任何想法或其他解決方案?在IE中動畫使用'+ ='的jquery問題

目前懸停效果的工作,因爲它應該,但 「滾下」 什麼也不做,在IE 感謝

$('#topProducts li').hover(
function() { 
    $(this).find('.topProdImg').stop().animate({ 
     bottom: '-=140' 
    }, 500) 
}, function() { 
    $(this).find('.topProdImg').stop().animate({ 
     bottom: '+=0' 
    }, 500) 
}); 

CSS:

.topProducts ul li img{ 
    position:absolute; 
    z-index:10; 
    padding-bottom:10px; 
    border-bottom:1px #ebebeb solid; 
    left: 20px; 
} 

感謝

回答

0

使用Bottom Margins結束。

$('#topProducts li').hover(
function() { 
    $(this).find('.topProdImg').stop(true,true).animate({marginBottom:'-140px'},200); 
}, function() { 

    $(this).find('.topProdImg').stop(true,true).animate({marginBottom:'0px'},400); 
}); 

乾杯

1

嘗試使用px

$('#topProducts li').hover(
function() { 
    $(this).find('.topProdImg').stop().animate({ 
     bottom: '-=140px' 
    }, 500) 
}, function() { 
    $(this).find('.topProdImg').stop().animate({ 
     bottom: '0px' //it doesn't sense to apply +=0 
    }, 500) 
}); 
+0

嗯,對不起,我認爲這是工作。但現在在所有瀏覽器上推出的圖像滑動高達+ 140px? – user2541153