Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't get slickGoTo working for custom slick navigation

Trying to use slick carousel and use my own custom icons for navigation instead of the default thoughts. I thought the best way to do this would be to set up my own list and use slickGoTo, but I can't get it to work.

$(document).ready(function(){

    $('.rps-slider').slick({
      infinite: true,
      arrows: true,
      dots:true
    });

    $(".slick-nav li a").click(function(e){
      var slideIndex = $(this).index();
      $( ".rps-slider" ).slickGoTo(parseInt(slideIndex));
    });

  });

jsfiddle here: http://jsfiddle.net/r7vjy7as/

like image 950
Seth DeHaan Avatar asked Feb 06 '15 15:02

Seth DeHaan


1 Answers

Use $( ".rps-slider" ).slick('slickGoTo', parseInt(slideIndex));

like image 133
faron Avatar answered Oct 27 '22 17:10

faron