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 Add a Sticky Navigation Bar Adding Sticky Navigation

Maxwell Gover
Maxwell Gover
4,246 Points

Header background wont change

For whatever reason I can't get the header background to change. I changed the main.js and main.css files, saved, and refreshed the page but I'm still getting a transparent background.

main . js

$(".animsition").animsition({
  inClass: 'fade-in-right-lg',
  outClass: 'fade-out-right-lg',
  linkElement: 'header a',
  inDuration: 1000,
  outDuration: 500
});

$('.header').sticky();

main . css

.header {
    background-color: white;
}

2 Answers

Can you post the HTML as well? It is probably something with your scripts or links in the html.

Yulia Markina
Yulia Markina
12,616 Points

Hi Maxwell!

First, check that you linked your js file with your html file. If you use JS plagin, make sure that you downloaded and linked provided file or included CDN link. Also, do you use tag <header> or class header in your HTML?