This forum is now read-only. Please use our new forums! Go to forums

banner
Close banner
0 points
Submitted by Nick S
about 9 years

How to build an HTML file that references a JS script or jQuery file on my own?

Recently I have been building .txt files and then changing the extension to .html to see what the page looks like in my browser. I’m at a point where I would like to add in some javascript, jQuery, or CSS effects..

In the tutorials our ‘index.html’ references tabs titled ‘script.js’ or ‘stylesheet.css’. How do I reference other documents like this when I am not on the codecademy UI?

Thanks

Answer 54c70b5f86f5525b84001854

1 vote

Permalink

For jQuery, add this line before the script tag for ‘script.js’:

<script src="http://code.jquery.com/jquery-1.11.2.min.js"></script>
points
Submitted by Roy
about 9 years

3 comments

Nick S about 9 years

Thank you Roy. In particular, I am trying to recreate the ‘Status Update Box’ from the Interactive Website track. I’d like to learn to practice coding it over and over until I can do it all the way through on my own.

Can this even be done in a simple .txt file? If I am just doing this so I can see it fire locally in my browser would I just link to other local files that contain my css and js? I’m not sure where that part of the code should go.

Thanks

Roy about 9 years

We are in the wrong Q&A to be discussing that course. May I recommend posting a question in the Status Update Q&A and I’ll keep a watch for it? Please, and thank you..

Nick S about 9 years

Sorry, I thought that I had asked my question in a general questions on jquery forum, not a general questions forum for the specific jquery course. Here is my question in the ‘make an interactive website’ update status box forum. http://www.codecademy.com/forum_questions/54cc859ae39efe6204000bbe