1

我在 jquery 循环幻灯片中有一个透明的 png。在翻转时,它从图像 A 淡入到 B。在鼠标移出时,它又回到 A。但是,它不会在之后的任何翻转上重复此淡入淡出。对此有什么想法吗?谢谢

    <script type="text/javascript">
    $(document).ready(function(){ 
          $('#picroll').cycle({                            
                timeout:.2,
                delay:  0, 
        fx: 'fade',
        continuous: false,
                speed:  300,
                autostop: 1
         }).cycle("pause").hover(function() {
                $(this).cycle('resume');
         },function(){
                $(this).cycle('pause');
         $(this).cycle('resume');
   })
     .mouseleave(function(){
        $(this).cycle(0, 'fade').cycle('play');
      });
    });
</script>

  <div id="picroll"><a href="#"><img src="images/group/PictureA.png" width="114" height="330"/>
  <img src="images/group/PictureB.png" width="114" height="330" /></div>
4

1 回答 1

1

改用这个:

$("#picroll").mouseover('
     $("#picroll:nth-child(1)").fadeOut(500);
     $("#picroll:nth-child(2)").fadeIn(500);
');
$("#picroll").mouseout('
     $("#picroll:nth-child(1)").fadeIn(500);
     $("#picroll:nth-child(2)").fadeOut(500);
');
于 2012-10-01T17:42:47.887 回答