Soong
Soong

Reputation: 147

Jssor (nested slider): how to disable AutoPlay?

Does anyone know how to prevent the nested slider to start upon loading? I've tried entering "$AutoPlay: false" inside "var nestedSliderOptions", but it doesn't work. Thanks in advance.

source: http://www.jssor.com/download.html examples-jquery > nested-slider.source.html

Upvotes: 0

Views: 1039

Answers (2)

jssor
jssor

Reputation: 6985

There is no 'auto play' for the main slider and 3 child sliders by default. It is controlled by manual API call.

By removing following code, you will get what you want.

        function OnMainSliderPark(currentIndex, fromIndex) {
            $.each(nestedSliders, function (index, nestedSlider) {
                nestedSlider.$Pause();
            });

            setTimeout(function () {
                nestedSliders[currentIndex].$Play();
            }, 2000);
        }

        jssor_slider1.$On($JssorSlider$.$EVT_PARK, OnMainSliderPark);
        OnMainSliderPark(0, 0);

Also, the grid slider is a variation of nested slider.

Upvotes: 2

Yaron U.
Yaron U.

Reputation: 7891

I don't know this plugin, but according to its documentation in here:

In order to prevent auto play you should call $Pause()

enter image description here

Just call this function right after you are creating the gallery

Upvotes: 1

Related Questions