Add ability to use asNavFor for many slicks
See original GitHub issueCurrently only one slick supported as navigation for, but if you change method to this:
Slick.prototype.asNavFor = function(index) {
var _ = this, asNavFor = _.options.asNavFor != null ? $(_.options.asNavFor) : null;
asNavFor.each(function() {
$(this).getSlick().slideHandler(index, true);
});
};
it would be possible to use multiple selectors in asNavFor
Issue Analytics
- State:
- Created 9 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
jQuery slick slider with multiple rows with asNavFor not ...
Works as wanted when $('.slider-nav') there is only one row, you can change rows: 2 to rows: 1 to $('.slider-nav'). How to get...
Read more >Support asNavFor for Vanilla slick, else TypeError: l.options is ...
Then we started a new optionset with the thumbnail skin and ran into a javascript error: TypeError: l.options is undefined in slick.min.js:1: ...
Read more >slick - the last carousel you'll ever need - Ken Wheeler
slick is a responsive carousel jQuery plugin that supports multiple breakpoints, CSS3 transitions, touch events/swiping & much more!
Read more >slick-asNavFor - CodePen
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https. ↑ Insert...
Read more >Adding a Slideshow to Drupal website using Slick - YouTube
In this video I've installed Slick Carousel to create a slideshow in my Drupal website.This is for a task of Google Code In....
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
I’ve got 2 instances of a slider on a page, they work perfectly apart from the dots only appear on the second slider? Any ideas?
jQuery(‘.slider-for’).each(function (idx, item) { var carouselId = “carousel” + idx; this.id = carouselId; var newClassFor = ‘#’+carouselId +‘.slider-nav’; jQuery(this).slick({ slidesToShow: 1, slidesToScroll: 1, arrows: false, fade: true, asNavFor: newClassFor }); });
jQuery(‘.slider-nav’).each(function (idx, item) { var carouselId = “carousel” + idx; this.id = carouselId; var newClass = ‘#’+carouselId +‘.slider-for’; console.log(newClass); jQuery(this).slick({ slidesToShow: 3, slidesToScroll: 1, asNavFor: newClass, dots: true, arrows:true, centerMode: false, focusOnSelect: true, }); });
If anyone else finds my error coming up above, Here’s my patch: