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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Konrad Pilch](https://uploads.teamtreehouse.com/production/profile-photos/2703362/micro_tiger.jpg)
Konrad Pilch
2,435 PointsHow to add animation?
Hello,
I know how to add animatino with jQuery, its just that i have no idea how to add animation like transition.
I know i can hide it and then fadeOut, but what about transition?
Heres my code
Im basically trying to reduplicate this site header(if you scroll down and up and look at the nav): http://www.bradhussey.ca/
2 Answers
![Shane Oliver](https://uploads.teamtreehouse.com/production/profile-photos/2333332/micro_shane.jpg)
Shane Oliver
19,977 PointsThe link to your code doesn't work, but you will need to add a z-index to the nav to place it on top of all other elements. Try logging to the console to determine the problem.
![Shane Oliver](https://uploads.teamtreehouse.com/production/profile-photos/2333332/micro_shane.jpg)
Shane Oliver
19,977 Pointsyou are adding the class incorrectly and in the wrong place.
add this line to your conditional checking the scroll position var navbar = $('nav').addClass('fixed');
Konrad Pilch
2,435 PointsKonrad Pilch
2,435 PointsIt shoudl work now. I don't know how the console logs work with codepen : p