Reputation: 1
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?
Upvotes: 0
Views: 188
Reputation: 10844
It's <script src="js/jquery-3.2.1.min.js"></script>
, same applies to lightbox
Upvotes: 0
Reputation: 134
Try using a "." in your script tags, for ex.
<script src="./js/jquery-3.2.1.min.js"></script>
Upvotes: 0
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
Reputation: 1030
You can put dot before slash like below or remove the slash
<script src="./js/lightbox.js"></script>
Upvotes: 1
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