jQuery outside of codecademy



I'm trying to get a "real-world" feel web development by attempting some projects of my own in my own editor. I can link HTML, CSS, and JS just fine, however I can't duplicate a basic fading box using jQuery outside of Codecademy.

I've created a .js file inside my web project, even cut and pasted code directly from Codecademy sessions. What am I missing?


Hi Dave,

In your index.html file, you're probably linking to jQuery like this:

<script src="//some-url.com/directory/jquery.min.js"></script

You'll need to change // to http(s)://, like this:

<script src="http://some-url.com/directory/jquery.min.js"><script>

If that's not the problem, would you mind posting the code you've got in each file?



      <link rel='stylesheet' type='text/css' href='C:\Users\user\workspace\myJSProject\WebContent\First style.css'/>
        <script type='text/javascript' src='C:\Users\user\workspace\myJSProject\WebContent\MyJs.js'></script>
        <div class="vanish"></div>
        <div class="vanish"></div>
        <div class="vanish"></div>
        <div class="vanish"></div>
        <br/><button>Click Me!</button>

.vanish {
height: 100px;
width: 100px;
display: inline-block;
background-color: #F38630;
border-radius: 5px;
$(document).ready(function() {
$('button').click(function() {


OK Dave, you're missing a link to jQuery. Add this right before your current <script> tag:

<script src="https://code.jquery.com/jquery-latest.min.js"></script>


I knew the jQuery was a javascript, but the training sessions here didn't make it clear on how jQuery operates.

Thanks for helping clarify.


No problem, glad I could help :)
Feel free to ask in the forums if you need help with your code later on!


Very helpful - thank you. I had the same issue and your script made it work for me.


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.