admin管理员组

文章数量:1321235

Here is Javascript being used for the same but slider is not in autoplay mode. Code that I am using for revolution slider is as given below. Slider works but by clicking only...it is not working in Autoplay mode

/* ========================================================== */
    /*   Revolution Slider - Home Page                            */
    /* ========================================================== */
    var tpj = jQuery;

    var revapi202;
    tpj(document).ready(function() {
        if (tpj("#rev_slider_202_1").revolution == undefined) {
            revslider_showDoubleJqueryError("#rev_slider_202_1");
        } else {
            revapi202 = tpj("#rev_slider_202_1").show().revolution({
                sliderType: "carousel",
                jsFileLocation: "../../revolution/js/",
                sliderLayout: "fullscreen",
                dottedOverlay: "none",
                delay: 1000,
                navigation: {
                    keyboardNavigation: "off",
                    keyboard_direction: "horizontal",
                    mouseScrollNavigation: "off",
                    onHoverStop: "off",
                    touch: {
                        touchenabled: "on",
                        swipe_threshold: 75,
                        swipe_min_touches: 50,
                        swipe_direction: "horizontal",
                        drag_block_vertical: false
                    },
                    bullets: {
                        enable: true,
                        hide_onmobile: true,
                        hide_under: 800,
                        style: "zeus",
                        hide_onleave: false,
                        direction: "horizontal",
                        h_align: "center",
                        v_align: "bottom",
                        h_offset: 0,
                        v_offset: 30,
                        space: 5,
                        tmp: '<span class="tp-bullet-image"></span><span class="tp-bullet-imageoverlay"></span><span class="tp-bullet-title">{{title}}</span>'
                    }
                },
                carousel: {
                        horizontal_align: "center",
                        vertical_align: "center",
                        fadeout: "off",
                        maxVisibleItems: 3,
                        infinity: "on",
                        space: 0,
                        stretch: "off"
                 },
                responsiveLevels: [1240, 1024, 778, 480],
                visibilityLevels: [1240, 1024, 778, 480],
                gridwidth: [1240, 1024, 778, 480],
                gridheight: [868, 768, 960, 720],
                lazyType: "none",
                shadow: 0,
                spinner: "off",
                stopLoop: "on",
                stopAfterLoops: 0,
                stopAtSlide: 0,
                shuffle: "off",
                autoHeight: "off",
                minHeight:600,
                fullScreenAutoWidth: "off",
                fullScreenAlignForce: "off",
                fullScreenOffsetContainer: "",
                fullScreenOffset: "60px",
                disableProgressBar: "on",
                hideThumbsOnMobile: "off",
                hideSliderAtLimit: 0,
                hideCaptionAtLimit: 0,
                hideAllCaptionAtLilmit: 0,
                debugMode: false,
                fallbacks: {
                    simplifyAll: "off",
                    nextSlideOnWindowFocus: "off",
                    disableFocusListener: false,
                }
            });
        }
    }); /*ready*/

Here is Javascript being used for the same but slider is not in autoplay mode. Code that I am using for revolution slider is as given below. Slider works but by clicking only...it is not working in Autoplay mode

/* ========================================================== */
    /*   Revolution Slider - Home Page                            */
    /* ========================================================== */
    var tpj = jQuery;

    var revapi202;
    tpj(document).ready(function() {
        if (tpj("#rev_slider_202_1").revolution == undefined) {
            revslider_showDoubleJqueryError("#rev_slider_202_1");
        } else {
            revapi202 = tpj("#rev_slider_202_1").show().revolution({
                sliderType: "carousel",
                jsFileLocation: "../../revolution/js/",
                sliderLayout: "fullscreen",
                dottedOverlay: "none",
                delay: 1000,
                navigation: {
                    keyboardNavigation: "off",
                    keyboard_direction: "horizontal",
                    mouseScrollNavigation: "off",
                    onHoverStop: "off",
                    touch: {
                        touchenabled: "on",
                        swipe_threshold: 75,
                        swipe_min_touches: 50,
                        swipe_direction: "horizontal",
                        drag_block_vertical: false
                    },
                    bullets: {
                        enable: true,
                        hide_onmobile: true,
                        hide_under: 800,
                        style: "zeus",
                        hide_onleave: false,
                        direction: "horizontal",
                        h_align: "center",
                        v_align: "bottom",
                        h_offset: 0,
                        v_offset: 30,
                        space: 5,
                        tmp: '<span class="tp-bullet-image"></span><span class="tp-bullet-imageoverlay"></span><span class="tp-bullet-title">{{title}}</span>'
                    }
                },
                carousel: {
                        horizontal_align: "center",
                        vertical_align: "center",
                        fadeout: "off",
                        maxVisibleItems: 3,
                        infinity: "on",
                        space: 0,
                        stretch: "off"
                 },
                responsiveLevels: [1240, 1024, 778, 480],
                visibilityLevels: [1240, 1024, 778, 480],
                gridwidth: [1240, 1024, 778, 480],
                gridheight: [868, 768, 960, 720],
                lazyType: "none",
                shadow: 0,
                spinner: "off",
                stopLoop: "on",
                stopAfterLoops: 0,
                stopAtSlide: 0,
                shuffle: "off",
                autoHeight: "off",
                minHeight:600,
                fullScreenAutoWidth: "off",
                fullScreenAlignForce: "off",
                fullScreenOffsetContainer: "",
                fullScreenOffset: "60px",
                disableProgressBar: "on",
                hideThumbsOnMobile: "off",
                hideSliderAtLimit: 0,
                hideCaptionAtLimit: 0,
                hideAllCaptionAtLilmit: 0,
                debugMode: false,
                fallbacks: {
                    simplifyAll: "off",
                    nextSlideOnWindowFocus: "off",
                    disableFocusListener: false,
                }
            });
        }
    }); /*ready*/
Share Improve this question asked Sep 16, 2016 at 10:00 DushyantDushyant 211 gold badge1 silver badge4 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 5

According to the documentation here: https://www.themepunch./revsliderjquery-doc/additional-javascript-settings/#autoplay-randomize

You need to change the settings to:

stopLoop: "off",
stopAfterLoops: -1,
stopAtSlide: -1

And that should set it to auto-rotate the slides.

本文标签: javascriptHow to enable autoplay of revolution slider in HTML websiteStack Overflow