$(function() { var _SlideshowTransitions = [ { $Duration: 800, $Delay: 100, $Cols: 8, $Rows: 4, $FlyDirection: 5, $Formation: $JssorSlideshowFormations$.$FormationZigZag, $Assembly: 1028, $ChessMode: { $Column: 3, $Row: 12 }, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseOutQuad }, $Opacity: 2 }, { $Duration:800, $Delay:100, $Cols:8, $Rows:4, $Opacity:2 }, ]; var options = { $DragOrientation: 3, $AutoPlay: true, $SlideDuration: 800, $AutoPlayInterval: 0, $SlideshowOptions: { //Options which specifies enable slideshow or not $Class: $JssorSlideshowRunner$, //Class to create instance of slideshow $Transitions: _SlideshowTransitions, //Transitions to play slide, see jssor slideshow transition builder $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_slider1 = new $JssorSlider$('slider1_container', options); //responsive code begin //you can remove responsive code if you don't want the slider scales //while window resizing function ScaleSlider() { var parentWidth = $('#slider1_container').parent().width(); if (parentWidth) { jssor_slider1.$ScaleWidth(parentWidth); } else window.setTimeout(ScaleSlider, 30); } //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 });