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 trial

JavaScript Using jQuery Plugins Using a jQuery Carousel The Carousel Challenge Solution

slideToShow 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: Can you share your code with us? I'll take a look and see if anything stands out.

$('.slides').slick({ fade: true, autoplay: true, autoplySpeed: 1000, arrows: false, dots: true, // infinite:true, slidesToShow:2, slidesToScroll:2 });

3 Answers

What exactly isn't working? Is one of the settings you are applying not working or are the slides not displaying at all?

The "fade" option does not seem to work with the "slidesToShow" options. Remove your "fade" option and it should work fine.

You 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!