视差内容滑块自动播放不起作用 [英] Parallax content slider autoplay not working

查看:84
本文介绍了视差内容滑块自动播放不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

视差内容滑块只能工作一次,但无法正常工作,没有任何错误。以下是 http://vilamihu.didacticmedia.ro/ 的示例,以下是重要的代码:

Parallax content slider works once, but then fails to work, without any error. here is the example http://vilamihu.didacticmedia.ro/ , and here are the important bits of code:

 <script type="text/javascript" src="js/modernizr.custom.28468.js"></script>
    <!--end slider -->
    <!---strat-date-piker---->
    <link rel="stylesheet" href="css/jquery-ui.css"/>
    <script src="js/jquery-ui.js"></script>
    <script>
        $(function () {
            $("#datepicker,#datepicker1").datepicker();
        });
    </script>
    <!---/End-date-piker---->
    <!--<link type="text/css" rel="stylesheet" href="css/JFGrid.css" />-->
    <link type="text/css" rel="stylesheet" href="css/JFFormStyle-1.css"/>
    <script type="text/javascript" src="js/JFCore.js"></script>
    <script type="text/javascript" src="js/JFForms.js"></script>
    <script type="text/javascript" src="js/jquery.cslider.js"></script>

这些是< head> 。这是正文:

 <div id="da-slider" class="da-slider">
        <div class="da-slide">
            <div class="da-img">
                <img src="images/slideprimu.jpg" alt="" class="class1" />
            </div>
        </div>

        <div class="da-slide">
            <div class="da-img">
                <img src="images/slide1.jpg" alt="" class="class1"/>

            </div>

        </div>

        <div class="da-slide">
            <div class="da-img">
                <img src="images/slide2.jpg" alt="" class="class1"/>
            </div>
        </div>

        <div class="da-slide">
            <div class="da-img">
                <img src="images/slide3.jpg" alt="" class="class1"/>
            </div>
        </div>

        <div class="da-slide">
            <div class="da-img">
                <img src="images/slide4.jpg" alt="" class="class1"/>
            </div>
        </div>

        <div class="da-slide">
            <div class="da-img">
                <img src="images/slide5.jpg" alt="" class="class1"/>
            </div>
        </div>

        <div class="da-slide">
            <div class="da-img">
                <img src="images/slide6.jpg" alt="" class="class1"/></div>
        </div>

        <!--/slide -->
    </div>

这里是jquery:

 $(document).ready(function () {
        $('#da-slider').cslider({

            current: 4,
            // index of current slide

            bgincrement: 50,
            // increment the background position
            // (parallax effect) when sliding
            circular: true,
            autoplay: true,
            // slideshow on / off

            interval: 500
            // time between transitions

        });
    });

注意:照片链接很好。如果我更改当前设置,那么它将从该照片开始,转一次,然后停止。任何想法将不胜感激!谢谢!

Note: the links to photos are good. if I change the "current" setting, then it will start at that photo, go once, and stop. Any ideas will be greatly appreciated! Thanks!

推荐答案

试试这个

$(document).ready(function () {
    $('#da-slider').cslider({

        current: 4,
        // index of current slide

        bgincrement: 50,
        // increment the background position
        // (parallax effect) when sliding
        circular: true,
        autoplay: true,
        // slideshow on / off

        intervalSec: 500
        // time between transitions

    });
});

我刚刚更改了价值名称 interval intervalSec

I have just changed name of value interval to intervalSec

根据文档其他内容应该没问题

as per the documentation other things should be okay

此外,在提供的网站链接中,您使用的是旧版本的jQuery v1.8.3
如果可能,请将其更新为最新版本 CDN ,对于CSS3较新的版本效果更好(注意:哪些不支持某些旧浏览器)

Also in the provided link of website you are using older version of jQuery v1.8.3 If possible update it to latest version CDN, as for CSS3 newer version works better(Note: which does not support some old browsers)

更新:在给定的网站链接中有两个使用不同版本的JQuery UI

Update: In the given website Link there are two JQuery UI of different versions used


  1. jQuery-UI 1.9.2

  2. jQuery-UI 1.9.1

  1. jQuery-UI 1.9.2
  2. jQuery-UI 1.9.1

请删除旧版本(js / jquery-ui.min.js)以避免任何冲突..

Please remove the older version(the js/jquery-ui.min.js) to avoid any conflict..

这篇关于视差内容滑块自动播放不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆