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

JQuery Plugin - Carousel/Slick.

Hey guys, I have been trying to get this plugin to work in my HTML file and everything I have tried has failed. I am pulling my hair out. Does anyone know what I am doing wrong?

I know Jquery and and slick.css are working because I added some lines of code in the "main.js" file that the html is linked to and added some custom styling in the slick.css to test if its working. It is literally everything but the plugin file. I have tried linking to a CDN, downloading the files, but nothing seems to work.

Here is my HTML file:

<!DOCTYPE html> <head> <link rel="stylesheet" type="text/css" href="slick/slick.css"></link> <link rel="stylesheet" type="text/css" href="slick/slick-theme.css"></link>

</head>

<body class="blue">

<div class="your-class"> <div>your content</div> <div>your content</div> <div>your content</div> </div>

<script src="js/jquery.js" type="text/javascript"></script> <script src="slick/slick.js" type="text/javascript"></script> <script src="js/main.js" type="text/javascript"></script> <script> $("your-class").slick({ dots: true; });

</script>

1 Answer

Are you missing the final </script> in your file?

No, when I copied and pasted my code I left that out by mistake. It is in my actual file. (I corrected the typo above). So I am not sure what is the problem.