0

Adding J-Query Library to a Blank Website

Hi all, Just finished a partial website and noticed that the JS isn't responding. Fact is that the website may not have JQuery/JS framework on it since it is a blank page. I found the official latest source code from site [jquery-1.8.1.min.js just ignore version date]and inserted it as a .js file into the html with no results at the <head> tag. Anyone have similar results when creating a page from scratch? EDIT: Oops, didn't realize I put <header> instead of <head> in question. It's in the right place just rendering issue

15th Jul 2018, 2:08 AM
Apple Blossom
Apple Blossom - avatar
4 Answers
0
In the <head> tag (NOT <header>), create a <script> tag like this: <script src=" "></script> To determine what to put as the src, this link will help: https://www.w3schools.com/htmL/html_filepaths.asp Remember, for use on SoloLearn, the jQuery file must be on the Internet -- you can't save it locally.
15th Jul 2018, 2:31 AM
James
James - avatar
0
Put it in the head tag, not header, like the lesson says https://www.sololearn.com/learn/jQuery/2785/
15th Jul 2018, 3:17 AM
Paul Grasser
Paul Grasser - avatar
0
Hi all, Didn't realize when the question was originally posted I used <header> instead of <head> tags. While there is a way to incorporate jquery directly into a blank web-page https://www.think2loud.com/576-jquery-101-adding-jquery-to-your-website/ the code itself operates like Top-Level, so I made sure that the jquery-library part came first before the JS script. What's interesting is that i'm getting a setInterval Parsing: unexpected token error which I believe has to do with an ESLint? The code error snippet looks exactly like this: setInterval(function())
15th Jul 2018, 4:26 AM
Apple Blossom
Apple Blossom - avatar
0
If it's true that your code looks exactly like that, then you are missing at least one parameter, which may be the token it is expecting. Syntax for setInterval(): https://www.w3schools.com/jsref/met_win_setinterval.asp
15th Jul 2018, 6:50 AM
Janning⭐
Janning⭐ - avatar