@@ -377,9 +377,11 @@ function lory(slider, opts) {
377377 classNamePrevCtrl = _options4 . classNamePrevCtrl ,
378378 classNameNextCtrl = _options4 . classNameNextCtrl ,
379379 enableMouseEvents = _options4 . enableMouseEvents ,
380- classNameActiveSlide = _options4 . classNameActiveSlide ;
380+ classNameActiveSlide = _options4 . classNameActiveSlide ,
381+ initialIndex = _options4 . initialIndex ;
381382
382383
384+ index = initialIndex ;
383385 frame = slider . getElementsByClassName ( classNameFrame ) [ 0 ] ;
384386 slideContainer = frame . getElementsByClassName ( classNameSlideContainer ) [ 0 ] ;
385387 prevCtrl = slider . getElementsByClassName ( classNamePrevCtrl ) [ 0 ] ;
@@ -437,7 +439,8 @@ function lory(slider, opts) {
437439 ease = _options5 . ease ,
438440 rewindSpeed = _options5 . rewindSpeed ,
439441 rewindOnResize = _options5 . rewindOnResize ,
440- classNameActiveSlide = _options5 . classNameActiveSlide ;
442+ classNameActiveSlide = _options5 . classNameActiveSlide ,
443+ initialIndex = _options5 . initialIndex ;
441444
442445
443446 slidesWidth = slideContainer . getBoundingClientRect ( ) . width || slideContainer . offsetWidth ;
@@ -450,7 +453,7 @@ function lory(slider, opts) {
450453 }
451454
452455 if ( rewindOnResize ) {
453- index = 0 ;
456+ index = initialIndex ;
454457 } else {
455458 ease = null ;
456459 rewindSpeed = 0 ;
@@ -758,6 +761,12 @@ exports.default = {
758761 */
759762 infinite : false ,
760763
764+ /**
765+ * the slide index to show when the slider is initialized.
766+ * @initialIndex {number}
767+ */
768+ initialIndex : 0 ,
769+
761770 /**
762771 * class name for slider frame
763772 * @classNameFrame {string}
0 commit comments