Mark the step visible in slick slider

1

I would like to know if someone knew how to mark the option that is visible in the navigation to the now that passes in autoplay the slider ,

I share my code:

$('.pasos[data-slide]').click(function(e) {
$(this).siblings().removeClass('active');

  var slideno = $(this).data('slide');
  $('.slidertuto').slick('slickGoTo', slideno - 1);
      $(this).addClass('active');
  });


$('.slidertuto').slick({
  infinite: true,
  slidesToShow: 1,
  slidesToScroll: 1,
  arrow:false,
  autoplay:true

});
    
asked by Luis Morales Ponce 18.04.2018 в 22:26
source

1 answer

0

To get the current image you have the method slickCurrentSlide

// Get the current slide
var currentSlide = $('.your-element').slick('slickCurrentSlide');

In addition, the div class is added to slick-active with the active image.

<div class="slick-slide slick-current slick-active" data-slick-index="0" aria-hidden="false" style="width: 560px;" tabindex="-1" role="option" aria-describedby="slick-slide00"><h3>1</h3></div>

Source

    
answered by 18.04.2018 в 23:01