This forum is now read-only. Please use our new forums at discuss.codecademy.com.

Animate Your Name Forum

View Course

1308 points
B23cebe47afa1e8c5f67e3ac6134d1fa?s=140&d=retro
Submitted by
hs1972
over 2 years ago

[resolved] Where do you link to in Javascript?

Within the HTML code it often specifies e.g.

<script type="text/javascript" src="http://s3.amazonaws.com/codecademy-content/courses/hour-of-code/js/alphabet.js"></script>

<script type="text/javascript" src="http://s3.amazonaws.com/codecademy-content/courses/hour-of-code/js/bubbles.js"></script>

However these are pointing to codecademy. If we were wanting to use these ourselves where would we link to?


0 votes

permalink

Hi hs1972 ,

If you are coding locally, by that I mean on your own computer, you should copy those files and store them on your computer. If you keep them in the same directory as your .html files then you can link to them like this:

<script type="text/javascript" src="alphabet.js"></script>

If you want to keep them in a different directory then you will need to add a path to your src attribute.

3698 points
55df2afa95e3787b9200005e_359368177
Submitted by
Judy
over 2 years ago

2 Comments

B23cebe47afa1e8c5f67e3ac6134d1fa?s=140&d=retro hs1972 over 2 years ago

Ah, OK, thanks for that!

55df2afa95e3787b9200005e_359368177 Judy over 2 years ago

You're welcome!