Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialSAHIL SANWAL
6,116 PointsslideToShow not working on home page
i tried the slides to show on home page and it did not work for some reason. here is the code $('.slides').slick({ fade: true, autoplay: true, autoplySpeed: 1000, arrows: false, dots: true, // infinite:true, slidesToShow:2, slidesToScroll:2 });
SAHIL SANWAL
6,116 Points$('.slides').slick({ fade: true, autoplay: true, autoplySpeed: 1000, arrows: false, dots: true, // infinite:true, slidesToShow:2, slidesToScroll:2 });
3 Answers
Daniel Mitchell
5,834 PointsWhat exactly isn't working? Is one of the settings you are applying not working or are the slides not displaying at all?
Matthew Brock
16,791 PointsThe "fade" option does not seem to work with the "slidesToShow" options. Remove your "fade" option and it should work fine.
Rafael Ferreira
13,086 PointsYou kept a comma after the dots: false configuration. That will create a error and won't let the carousel work. Try this:
$('.slides').slick({
fade: true,
autoplay: true,
autoplaySpeed: 1000,
arrows: false,
dots: true
});
I usually do each config option in a separated line, it's easier to read. Hope it helps!
Shawn Flanigan
Courses Plus Student 15,815 PointsShawn Flanigan
Courses Plus Student 15,815 PointsSahil: Can you share your code with us? I'll take a look and see if anything stands out.