Question

var options = {$AutoPlay: true}

var jssor_slider1 = new $JssorSlider$("slider1_container", options);
var jssor_slider2 = new $JssorSlider$("slider2_container", options); 

I have 2 slide banners using Jssor plugin, my problem is that I only need one of those banners to be set as auto play.

If I change var options to $AutoPlay:false then both banners will stop auto play.

Is there any way to access option from var jssor_slider2 and set auto play to false for it?

http://www.jssor.com/

Was it helpful?

Solution

3 solutions here,

var options = {$AutoPlay: false};

var jssor_slider1 = new $JssorSlider$("slider1_container", options);
var jssor_slider2 = new $JssorSlider$("slider2_container", options); 
jssor_slider1.$Play();

or

var options = {$AutoPlay: true};

var jssor_slider1 = new $JssorSlider$("slider1_container", options);
var jssor_slider2 = new $JssorSlider$("slider2_container", options); 
jssor_slider2.$Pause();

or

var options1 = {$AutoPlay: true};
var options2 = {$AutoPlay: false};

var jssor_slider1 = new $JssorSlider$("slider1_container", options1);
var jssor_slider2 = new $JssorSlider$("slider2_container", options2);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top