Cannot get slickGoTo to work for custom slide navigation

Trying to use grease and use my own icons for navigation, not the default thoughts. I thought the best way to do this is to create your 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/

+6
source share
1 answer

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

+13
source

Source: https://habr.com/ru/post/982098/


All Articles