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 trialSergio Cruz
15,550 Pointssticky() only applies to work.html. Does not work on team.html or index.html. Console says sticky is not a method
They are both linked the same way as work.html. No typos. They both have the header class. I dont understand why it doesnt work. This is how the js are linked:
</footer><!--/footer-->
</div>
<script src="js/jquery-1.11.2.min.js"></script>
<script src="js/animsition/jquery.animsition.min.js"></script>
<script src="js/sticky/jquery.sticky.js"></script>
<script src="js/main.js"></script>
</body>
</html>
And they all have:
<div class="row container animsition"> <header class="row header">
I'm calling them on the external js file with:
$('.header').sticky();
For some reason it only works in work.html. What's happening?
3 Answers
Dan Garnham
1,495 Pointsdid you find an answer to this i am having the same problem
Sam Davidoff
5,295 PointsHey,
I had the same issue and resolved it by checking all the script tags, there was a typo that I copied onto the other pages. I think that when a function isn't recognized it always has to do with with asset sourcing.
Hope that helps
Cynthia Norwood
Front End Web Development Techdegree Graduate 15,214 PointsI had the same issue the nav did not stick to the top, I retyped and copied the script link in each html file and now the nav sticks.
Sergio Cruz
15,550 PointsSergio Cruz
15,550 PointsNo, nothing. All my script tags are in place so I don't know whats causing it