how to add thumbnails to dots of slick slider mentioning the current slide

后端 未结 1 1626
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-02 17:00

I am currently working on a new project which required a slider. I have implemented slick JS for one of my project.

Now I need to add thumbnails which will appear when

1条回答
  •  生来不讨喜
    2021-02-02 17:41

    You may replace dots with custom thumbnails. You would need to add thumbnails somewhere (for example, in a hidden div inside the image slide wrapper. See the code for reference:

    $('.slideme').slick({
      dots: true,
      customPaging: function(slider, i) { 
        // this example would render "tabs" with titles
        return '';
      },
    });
    

    You would also need tweak up the native Slick pager css to remove dots and add more space and styles for your thumbnails

    0 讨论(0)
提交回复
热议问题