Hot! Slick centerMode infinite slickGoTo Bug
See original GitHub issueHi, I need an advice! I change slides by click on the image previews on the carousel.
Demonstration: https://jsfiddle.net/er712r5z/4/
With 5 visible slides doesn’t work clicking on -2 index slide when 0 slide is active! But -1 slide click works fine and if I go to 1,2,3 and other slides, -2 index click slide works fine (ever click on the left slide). How do I need to correct my code to work negative -2 index?
`$(“#setSlider .setSliderListOneImage”).click(function(){ var index = $(this).parent().data(“slick-index”); $(“.setSliderList”).slick(“slickGoTo”,index); });
$('.setSliderList').slick({
autoplay:false,
infinite: true,
arrows:true,
dots: true,
speed: 600,
slidesToShow: 5,
swipe: false,
centerMode: true,
initialSlide: 0,
responsive: [
{
breakpoint: 1400,
settings: {
slidesToShow: 3
}
},{
breakpoint: 768,
settings: {
slidesToShow: 1
}
}
]
});`
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:7
Top Results From Across the Web
slick slider - css transition infinite loop bug - Stack Overflow
Solution 1 - Use Flickity. If you want to try another carousel control, you can have a look at Flickity. According to my...
Read more >slick slider white space
When using center mode and infinite false with variable width you get extra white space at first slide left side and last slide...
Read more >kenwheeler / slick the last carousel... - Course Hero
IfremoveBefore is set to false, remove theslide following index, or the last slide if noindex is set.slickFilterfilter : selectoror functionFilters slides using ...
Read more >slick slider js Code Example
('.responsive').slick({ dots: true, infinite: false, speed: 300, slidesToShow: 4, slidesToScroll: 4, responsive: [ { breakpoint: 1024, ...
Read more >Angular Slick Carousel 1 (forked) - StackBlitz
import 'slick-carousel/slick/slick.js' ... centerMode: true,. centerPadding: '60px',. slidesToShow: 3,. vertical: true,. infinite: true,.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Found a solution! Adding “focusOnSelect: true” fix the bug. This il my initialization:
$('.selettore--track').slick({ centerMode: true, centerPadding: '0px', slidesToShow: 5, infinite: true, initialSlide: 0, focusOnSelect: true
Hope this will help someone. I’m using slick 1.9.0 and jquery 3.3.1
This bug is still present in the latest version (1.9.0). I have not found any other issue that talks about this. Has anyone found a solution?