Including An External Jquery File In Html
So guys, I guess my question is quite understandable: I want to include an external jQuery file into my HTML. I tried many many ways, which I thought (and still think) were correct
Solution 1:
If you navigated to a page that physically resides in a folder structure like so:
http://mywebsite.com/folder1/subfolder1/myPage.html
Then with your current code the source is going to look like this:
src="http://mywebsite.com/folder1/subfolder1/js/pinkmoon.js"
Which is not what you want. What you do want is this:
<script type="text/javascript" src="/js/pinkmoon.js"></script>
Which would infer that the physical location of pinkmoon.js
resides at:
http://mywebsite.com/js/pinkmoon.js
Solution 2:
This should work. Be sure to have the file you want to include in a directory called "js" at the same level of you html file.
For exemple :
mysite/index.html
mysite/js/pinkmoon.js
Post a Comment for "Including An External Jquery File In Html"