Hi there. Not directly related to Free Code Camp but… Anyone able to help with a small CodePen related issue? I built a simple web page that counts down the number of days until christmas using jquery and a jquery plugin. Everything works fine from my github account (https://peterlewicki.github.io/christmas_countdown/). However I also wanted to showcase it on CodePen but the countdown is not working there . https://codepen.io/peterlewicki/pen/MEzyzW I’ve added the jquery libraries to the settings page but still nothing. I know it’s probably something small and stupid that I’m overlooking but if anyone could spare 2 minutes to help me I’d be grateful. Cheers and thank you in advance.
In the HTML textarea you should only put everything that should go in between
<body></body>. All the JS imports should be in the settings and all the JS code should be in the JS textarea.
Also, it seems like you are refering to local files (e.g.
js/jquery.plugin.min.js), where should CodePen fetch these from?
Aha. I need to host the plugins somewhere online?
Yes, but you already have them on GitHub, so you can just get the “raw” version from there:
Super. Thank you for your time and help.
You can’t use any
<script> tag in the JS editor. Only valid JS code can go there. Try moving the JS files in the
src to the JS settings instead.
that didn;t seem to work either.
Weird. I’m getting warnings saying the page fails to load the JS files from GitHub.
So what should it do? I don’t see any links to your github, but the countdown works fine.