JavaScript Carousel / Slider:如何添加图像的自动转换?

时间:2014-06-24 10:40:20

标签: javascript jquery html slider carousel

我已经将一些JavaScript代码混合在一起,允许用户浏览3个不同的图像(包含内容),点击图片编号或使用左/右箭头按钮。这很好用,但我想添加一个功能,使滑块能够自动转换内容。我很遗憾地实现了jQuery而不是Bootstrap。我有一个修补" .interval"但没有到达任何地方。有人可以帮忙吗?到目前为止,我的代码JS代码如下所示:

        $(document).ready(function(){ 

        $("#home").click(function(){

            $("#about-page").fadeOut();
            $("#work-page").fadeOut();
            $("#contact-page").fadeOut();
            $("#menu").animate({width : "0px"});

          });


          $("#pag1").click(function(){

            $("#imageandcaption1").hide();
            $("#imageandcaption3").hide();
            $("#imageandcaption2").fadeIn();

            $("#arrow-left1").hide();
            $("#arrow-right1").hide();
            $("#arrow-left3").hide();
            $("#arrow-right3").hide();
            $("#arrow-left2").show();
            $("#arrow-right2").show();

          });
         });

感谢您的帮助。

0 个答案:

没有答案