$(function() { var options = { $DragOrientation: 3, $AutoPlay: true, $SlideDuration: 800, $AutoPlayInterval: 0, $FillMode:1, //The way to fill image in slide, 0: //stretch, 1: contain (keep aspect ratio and put all inside slide), //2: cover (keep aspect ratio and cover whole slide), //4: actual size, 5: contain for large image and actual size for small image, //default value is 0 $SlideshowOptions: { //Options which specifies enable slideshow or not $Class: $JssorSlideshowRunner$, //Class to create instance of slideshow $TransitionsOrder: 1, //The way to choose transition to play slide, 1 Sequence, 0 Random $ShowLink: 2, //0 After Slideshow, 2 Always $ContentMode: false //Whether to trait content as slide, otherwise trait an image as slide },$BulletNavigatorOptions: { //[Optional] Options to specify and enable navigator or not $Class: $JssorBulletNavigator$, //[Required] Class to create navigator instance $ChanceToShow: 2, //[Required] 0 Never, 1 Mouse Over, 2 Always $AutoCenter: 1, //[Optional] Auto center navigator in parent container, 0 None, 1 Horizontal, 2 Vertical, 3 Both, default value is 0 $Steps: 1, //[Optional] Steps to go for each navigation request, default value is 1 $Lanes: 1, //[Optional] Specify lanes to arrange items, default value is 1 $SpacingX: 8, //[Optional] Horizontal space between each item in pixel, default value is 0 $SpacingY: 8, //[Optional] Vertical space between each item in pixel, default value is 0 $Orientation: 1 //[Optional] The orientation of the navigator, 1 horizontal, 2 vertical, default value is 1 }, $ArrowNavigatorOptions: { //[Optional] Options to specify and enable arrow navigator or not $Class: $JssorArrowNavigator$, //[Requried] Class to create arrow navigator instance $ChanceToShow: 1, //[Required] 0 Never, 1 Mouse Over, 2 Always $AutoCenter: 2, //[Optional] Auto center arrows in parent container, 0 No, 1 Horizontal, 2 Vertical, 3 Both, default value is 0 $Steps: 1 //[Optional] Steps to go for each navigation request, default value is 1 } }; var jssor_multiple_slider = []; $('.slider1_container').each(function(index,value){ var idSlider = value.getAttribute('data-idslider'); jssor_multiple_slider[idSlider] = new $JssorSlider$(idSlider, options); }); //responsive code begin //you can remove responsive code if you don't want the slider scales //while window resizes function ScaleSlider() { $('.slider1_container').each(function(index,value){ var idSlider = value.getAttribute('data-idslider'); var parentWidth = $('#' + idSlider).parent().width(); if (parentWidth) { jssor_multiple_slider[idSlider].$ScaleWidth(parentWidth); } }); }; //Scale slider after document ready ScaleSlider(); //Scale slider while window load/resize/orientationchange. $(window).bind("load", ScaleSlider); $(window).bind("resize", ScaleSlider); $(window).bind("orientationchange", ScaleSlider); //responsive code end });