Slick unable to deal with multiple sliders
See original GitHub issueIf I have more than one slider, Slick.js will get confused and produce a whole bunch of broken prev/next links: http://jsfiddle.net/frank_o/Lr30ngo1/3/
I tried doing like $(this).find('.option')
and $(this).find('.prev_next')
but that gave me Syntax error, unrecognized expression: [object Object]:not(.slick-cloned) in jquery-2.1.0.js:1429
: http://jsfiddle.net/frank_o/Lr30ngo1/4/
Anybody have any ideas?
Issue Analytics
- State:
- Created 9 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Multiple slick issue - jquery
Slick slider must initiate if length of items are >= 3. And I can't find out how to resolve this. Here is the...
Read more >Can't manage to synchronise two Slick Carousel together ...
My main goal is to have a Slider Syncing on my work website (see http://kenwheeler.github.io/slick/) ; basicaly, what I want can be found...
Read more >accessible-slick - the last (accessible) carousel you'll ever need
accessible-slick is a highly accessible version of the popular Slick Slider responsive carousel jQuery plugin that supports multiple breakpoints, ...
Read more >Slider Not Working !!! Trick to Handle ANY Slider - YouTube
Your browser can't play this video. ... Trick to Handle ANY Slider ... Two most popular sliders are Slick Slider and Flex Slider....
Read more >react slick slider css issue of our previous video ... - YouTube
in this video we will see how to overcome the css issue we are facing in our last video. we will see how...
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
Here is how I solve it. Just reference “this” in each loop, and use it as selector for next and prev btns. Ofc, selector depend on you HTML structure. So here I will post just JS.
$(‘.slider’).each(function(){ var slickInduvidual = $(this); slickInduvidual.slick({ nextArrow: slickInduvidual.next().find(‘.right’), prevArrow: slickInduvidual.next().find(‘.left’) }); })
@saxsax1995 I had to tweak it since my arrows were siblings but not the next sibling. [$(‘.slick’).each(function(){ var slickIndividual = $(this); slickIndividual.slick({ dots: true, arrows: true, infinite: true, fade: true, appendDots: slickIndividual.next(‘.slick-pager’), nextArrow: slickIndividual.siblings(‘.next’), prevArrow: slickIndividual.siblings(‘.prev’) }); })]