Dan Mayer
Dan Mayer

Reputation: 1

Trouble with js files connecting to my html

I'm having trouble getting my js files to connect to my html pages. I am using jquery and a premade lightbox .js file. When I pull up chrome console, it's saying the files are not found, and I'm positive they are directed properly. Any ideas?

enter image description here

Upvotes: 0

Views: 188

Answers (5)

codejockie
codejockie

Reputation: 10844

It's <script src="js/jquery-3.2.1.min.js"></script>, same applies to lightbox

Upvotes: 0

samcozmid
samcozmid

Reputation: 134

Try using a "." in your script tags, for ex.

<script src="./js/jquery-3.2.1.min.js"></script>

Upvotes: 0

weilbith
weilbith

Reputation: 654

Your are using absolute paths. That doesn't work here. Just remove the leading slash / in front of your script source paths. Afterwards it should work like charm.

Upvotes: 0

slon
slon

Reputation: 1030

You can put dot before slash like below or remove the slash

<script src="./js/lightbox.js"></script>

Upvotes: 1

Sanchit Patiyal
Sanchit Patiyal

Reputation: 4920

You need to remove the / at the start of the path.

Change it to <script src="js/lightbox.js"></script> and similarly for everthing you are including tn your html

Upvotes: 1

Related Questions