Z-index悬停jquery问题

Z-index悬停jquery问题,jquery,hover,z-index,slideshow,Jquery,Hover,Z Index,Slideshow,我在幻灯片框上有一个透明的png,设置使用z索引。我需要能够悬停在顶部/透明图像上,并在悬停关闭时启动和停止底层幻灯片放映。我使用的脚本在幻灯片中效果很好,但我需要顶部的透明div作为“触发器”。如何将此div添加到此脚本?让我们将透明图像的ID设置为“trans_image”。此外,如果您能链接到关于此的好教程,我将不胜感激 $(document).ready(function() { $('.slideshow').cycle({ fx: 'fade', speed: 1,

我在幻灯片框上有一个透明的png,设置使用z索引。我需要能够悬停在顶部/透明图像上,并在悬停关闭时启动和停止底层幻灯片放映。我使用的脚本在幻灯片中效果很好,但我需要顶部的透明div作为“触发器”。如何将此div添加到此脚本?让我们将透明图像的ID设置为“trans_image”。此外,如果您能链接到关于此的好教程,我将不胜感激

$(document).ready(function() {
$('.slideshow').cycle({
    fx: 'fade', 
    speed: 1,
     delay:  1, 
        speed:  1
  }).cycle("pause").hover(function() {
        $(this).cycle('resume');
  },function(){
        $(this).cycle('pause');
  });
});

很难说没有看到你的HTML布局,但是你试过这个吗

$('#trans_image').hover(function() {
        $('.slideshow').cycle('resume');
    },
    function() {
        $('.slideshow').cycle('pause');
    });

谢谢你,dgvid-我把它做得比必要的难多了-这很有效!我明白为什么。