javascript - Choosing personalization slide in Jssor slider -
javascript - Choosing personalization slide in Jssor slider -
first have slider 3 images rotate , have selector.
var jssor_slider1 = new $jssorslider$("slider1_container", options);
i have function in which, depending on selected alternative in select, want stop , show specific slide slider.
how he?
this function have not work well.
$(".enlace").click(function(i){ var id = $(this).attr("id"); if(id == 'sdinero'){ options = { $autoplay: false, $startindex : 0, $pauseonhover : 3 }; var jssor_slider2 = new $jssorslider$("slider1_container", options); } else{ options = { $autoplay: false, $startindex : 1, $pauseonhover : 3 }; var jssor_slider3 = new $jssorslider$("slider1_container", options); } if(contador==0){ var text = $(this).text(); $('#tit').text(text); $("#proyecto").val(id); $("#proyecto").change(); $(".enlace").slideup('fast'); $('#opaco').css('display','none'); $('.main').css('display','block'); $('#simulador-container').css('height','450px'); $("#simulador-container").slidedown('fast'); $('#slider1_container').css('height','495px'); $("#slider1_container").slidedown('fast'); contador = 1; } else{ var id = $(this).attr("id"); var text = $(this).text(); $('#tit').text(text); $("#proyecto").val(id); $("#proyecto").change(); $(".enlace").slideup('fast'); }
});
thank you.
you can job in next manner,
var options = { ... $autoplay: false, ... }; var jssor_slider1 = new $jssorslider$("slider1_container", options); function optionselectedhandler(optionvalue) { var slideindex = 2; if(optionvalue == "sdinero"){ slideindex = 0; } jssor_slider1.$playto(slideindex); //optionally can utilize next line switch slider specified slide directly. //jssor_slider1.$goto(index); } //your code here //do capture 'select' event , phone call optionselectedhandler
javascript jquery slider slide jssor
Comments
Post a Comment