它在本地机器上的Firefox上正常工作,但是当我在线上传文件时,它仅停止动画并显示静态图像。当我将文件上传到在线服务器时,jQuery图像悬停在Firefox上不起作用
的JavaScript我使用:
<script type="text/javascript">
$(document).ready(function() {
$("ul.gallery li").hover(function() { //On hover...
var thumbOver = $(this).find("img").attr("src"); //Get image url and assign it to 'thumbOver'
//Set a background image(thumbOver) on the <a> tag - Set position to bottom
$(this).find("a.thumb").css({'background' : 'url(' + thumbOver + ') no-repeat center bottom'});
//Animate the image to 0 opacity (fade it out)
$(this).find("span").stop().fadeTo('normal', 0 , function() {
$(this).hide() //Hide the image after fade
});
} , function() { //on hover out...
//Fade the image to full opacity
$(this).find("span").stop().fadeTo('normal', 1).show();
});
});</script>
任何想法,为什么它的发生! 解决方案?
你正在加载jquery两次..那会是问题吗? – Ben 2010-02-25 22:10:35