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
Zach Allen
13,815 PointsThe Carousel Challenge - plugin not working
I added all the code in the same way the solution showed, as far as I know. However, I can't get the plugin to show in the preview. All that appears is the divs stacked on top of each other. I took out the Slides.html and inserted some divs to make the code easier to find errors; it should work regardless. What am I doing wrong?
<!DOCTYPE html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Agency - A Treehouse template</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--CSS-->
<link href='http://fonts.googleapis.com/css?family=Roboto:400,100,300,500,700,900' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/normalize.min.css">
<link rel="stylesheet" href="js/slick/slick.css">
<link rel="stylesheet" href="js/slick/slick-theme.css">
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<div class="row">
<header class="row header">
<div class="grid-third">
<a href="index.html" class="logo "></a>
</div>
<div class="grid-third tagline">
<h1 class="description">We build apps</h1>
</div>
<div class="grid-third">
<nav>
<a href="index.html">Home</a>
<a href="work.html">Work</a>
<a href="#" class="active">Team</a>
</nav>
</div>
</header><!--/header-->
<div class="main row">
<div class="grid-full">
<div class="team">
<h2>Meet the team</h2>
<h4>United we stand divided we fail</h4>
</div>
<!-- slides go here-->
<div class="slides">
<div>slide 1</div>
<div>slide 2</div>
<div>slide 3</div>
</div>
</div>
</div><!--/main-->
<footer>
<div class="row">
<div class="grid-full">
<p>Connect with us</p>
<ul class="social">
<li>
<a href="#" class="pink"></a>
<a href="#" class="light-blue"></a>
<a href="#" class="dark-blue"></a>
</li>
</ul>
</div>
</div>
</footer><!--/footer-->
</div>
<script src="js/jquery-1.11.2.min.js"></script>
<script src="js/slick/slick.min.js"></script>
<script>
$('.slides').slick({
dots: true,
infinite: true,
slidesToShow: 4,
slidesToScroll: 3
});
</script>
</body>
</html>
1 Answer
Ted Sumner
Courses Plus Student 17,967 PointsI think you need to use the code exactly as they wanted. Otherwise the JavaScript will not see what it expects.