2010-10-13 85 views
2

该动画在Firefox中运行良好,但在IE中,它在第一次将鼠标悬停在div上时运行动画的第一部分,第二次悬停时运行第二部分动画。我需要这一切在同一时间运行。jquery animate在IE中的行为不同

任何想法?

$(document).ready(function() { 

$("#test1").hover(

    function() { 
     $(this).animate({ 
      width: "599px", 
      left: "0px", 
      height: "168px", 
      //backgroundColor: "#d7df23", 
      opacity: 0.95, 
      borderWidth: "0px" 
     }, 100).css("z-index", "10"); 
     $(this).find(".thumb").animate({ 
      width: "150px", 
      height: "150px", 
      marginTop: "8px", 
      marginRight: "0px", 
      marginBottom: "0px", 
      marginLeft: "12px", 
      borderColor: "#FFF" 
     }, 100).attr('src','images/home/animatedMenu/brochureRequestIMG.jpg'); 

    }, function() { 

}); 

}); 

回答

2

得到的答案...

$(document).ready(function() { 

$("#test1").hover(

    function() { 
     $(this).animate({ 
      width: "599px", 
      left: "0px", 
      height: "168px", 
      opacity: 0.95 
     }, 100).css("z-index", "10"); 
     $(this).find(".thumb").animate({ 
      width: "150px", 
      height: "150px", 
      marginTop: "8px", 
      marginRight: "0px", 
      marginBottom: "0px", 
      marginLeft: "12px" 
     }, 100).attr('src','images/home/animatedMenu/brochureRequestIMG.jpg'); 

    }, function() { 

}); 

}); 

问题是与边框样式......他们打破它在IE中。