jquery - Slick Carousel Blank Slides -


i set overlay slick carousel, when click on image larger carousel appears selected image initialslide. however, slick carousel adding several blank slides after initialslide. know why? also, how can restart overlay carousel upon close?

    $("#sync1 .item").on("click", function() {          var index = $(this).attr("data-slick-index");         $(".overlay-carousel-container").css("display", "block");         $("body").css("overflow", "hidden");         $("#overlaycarousel").slick({           slidestoshow: 1,             fade: true,             initialslide: index,             focusonselect: true         });      }) <div class="overlay-carousel-container">     <a class="close">&nbsp;</a>         <div class="overlay-wrapper">                 <div class="overlay-img-wrapper">                      <div class="overlay-carousel-nav" id="overlaycarousel">                          <div class="overlay-slider-img"><img src="img/apparel/1.jpg"></div>                         <div  class="overlay-slider-img"><img src="img/apparel/2.jpg"></div>                         <div  class="overlay-slider-img"><img src="img/apparel/3.png"></div>                         <div  class="overlay-slider-img"><img src="img/apparel/4.jpg"></div>                         <div  class="overlay-slider-img"><img src="img/apparel/5.jpg"></div>                         <div  class="overlay-slider-img"><img src="img/apparel/6.jpg"></div>                         <div  class="overlay-slider-img"><img src="img/apparel/7.png"></div>                       </div>                   </div>         </div>   </div>       

in order restart overlay slider suggest "kill" when user closes it. way onclick build again relevant index slide.

just add following overlay close event:

$("#overlaycarousel").slick("unslick"); 

please notice asking 2 questions in 1 post not allowed here. it's better adding jsfiddle code can try figure out went wrong. think it's best open new question full code example , leave edit question address 1 i've tried solving you.


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -