Javascript jquery中图像之间的间隔

Javascript jquery中图像之间的间隔,javascript,jquery,image,transition,Javascript,Jquery,Image,Transition,我开始学习jquery,现在正在使用jquery进行标题图像交叉。我让代码工作,但我现在需要的是图像之间的间隔,在交叉后,我希望脚本暂停一个特定的时间,然后继续下一个图像 我有这个密码 $(document).ready(function(e) { $('.img:gt(0)').hide(); setInterval(function(){ $(".img:first-child").fadeOut(3000).next(".img").fadeIn(3000)

我开始学习jquery,现在正在使用jquery进行标题图像交叉。我让代码工作,但我现在需要的是图像之间的间隔,在交叉后,我希望脚本暂停一个特定的时间,然后继续下一个图像

我有这个密码

$(document).ready(function(e) {
    $('.img:gt(0)').hide();
    setInterval(function(){
        $(".img:first-child").fadeOut(3000).next(".img").fadeIn(3000).end().appendTo("#kop")
    }, 4000);
});
这是可能的形式,还是我必须完全改变代码


我现在让它在我的测试服务器上运行

目前的情况是,转换需要3000毫秒,其间转换函数调用是4000毫秒-因此,您只能获得1000毫秒的“延迟”。
setInterval()
中的第二个参数是
delay
时间,它在下面的代码中等于
fadeTime
+
delay
时间

$(document).ready(function(e) {
    var delay = 3000, 
        fadeTime = 3000;
    $('.img:gt(0)').hide();
    setInterval(function(){
        $(".img:first-child").fadeOut(fadeTime).next(".img").fadeIn(fadeTime).end().appendTo("#kop")
    }, delay+fadeTime);
});

thnx很多我在我的网站上实现了代码,它工作得很好,谢谢。