My sticky header JS works on codepen, but not locally on crome

Hello!

I’m working locally on brackets (easier for me than on the codepen editor), I then I paste it to codepen.

The tricky thing: the JS for the sticky header works on codepen, but not on brackets.

Thought it would be the jQuery CDN, but I pasted the latest one.

Here’s a link to my codepen project

Would love some advice.

figured it… had to enclose all the JS in document.ready();
Codepen does this by default