Javascript .animate淡入/淡出无法正常工作

时间:2014-09-17 06:53:22

标签: javascript animation

我的主页上有我的帖子中的图片,我根据这个网站使用了以下javascript(http://grepable.blogspot.sg/2013/01/modify-homepage-image-animation-in.html),当我将鼠标移到它们上面时,我的图像会淡出,当我移动鼠标时,我的图像会淡入:

<script type='text/javascript'>
$(function() {
$('.snips-image').hover(function() {
    $(this).find('img').animate({
        opacity: 0
    }, {    
        queue: false,
        duration: 400
    });
}, function() {
    $(this).find('img').animate({
        top: '0px',
        opacity: 1
    }, {
        queue: false,
        duration: 400
    });
});
})
</script>

它一直运行良好,但今天我注意到javascript不再工作,动画消失了;将鼠标悬停在图像上时,图像只是静态的。它们现在看起来像这样(http:// mermaidwithabook .blogspot.com /&lt; ---请删除它们之间的空格)。如何使javascript像以前一样工作?我不知道出了什么问题。当您将鼠标悬停在此网站上时,图像应该淡出(http://grepable.blogspot.com/)。

非常感谢帮助。谢谢!

0 个答案:

没有答案
相关问题