Why jquery script works online while the offline package doesn't work on chrome ? | Sololearn: Learn to code for FREE!

0

Why jquery script works online while the offline package doesn't work on chrome ?

1/27/2022 7:07:56 AM

Mohammed

14 Answers

New Answer

+3

Did you download the offline jquery package?

+2

Mohammed Try to download CDN jQuery library and put this library and html file in same folder then try to open in Chrome or Mozilla and see what comes in Console.

+2

are you using local path ? i mean file://sdcard/ like that ?.. it cant be done .. you cant access local storage from http server directly

+1

Is not possible you are missing something..... post your code and i can help you

+1

Change src="https://code.jquery.com/jquery-3.1.1.js" With src="relativePath/jquery-3.1.1.js"

+1

Example: If your html file is under c:\mySite and your jquery.js is under c:\mySite\js you only need to write the path of jquery file relative to html file path src="js/jqueryFile.js"

0

There must be a script file you are missing

0

Kapama, Joshua No, the code remains the same, I tried cut paste the online jquery path (It works), the offline path doesn't work.

0

Marco Ginato, Kapama, Joshua https://code.sololearn.com/WO21KE4L9Jik/?ref=app

0

Of course.

0

Marco Ginato It's in the same folder, I tried the full path too.

0

Remember the starting point Is the Path of index.html

0

Marco Ginato I haven't got what you mean, I copied the full path and it shows no errors on the path.

0

just use reference path.. like "./sdcard/" from your root folder ..