This forum is now read-only. Please use our new forums! Go to forums

banner
Close banner
0 points
Submitted by sickmore86
over 10 years

Is jQuery won't work at offline?

I try to save the code as a html file and the script.js too. Both locate at my C:\ . When I open it, it didn’t show any jQuery effects.

Answer 5271065eabf8216e8f002dcd

0 votes

Permalink

Codeacademy inserts for you a script tag in the index.html file to load jquery library. To make it works offline you should download jquery library and load it from your index.html file or add this line to use the google cdn.

<script src=//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js></script>
points
Submitted by Francisco Puga
over 10 years

1 comments

sickmore86 over 10 years

Thanks for your reply. I will try to download the library. But the line you mention I have had it in the .html file and doesn’t work. As below shown:

Answer 5273dc58548c35618c0010a0

0 votes

Permalink

Sorry for the mess. I don’t know how to comment the code in a proper way.

<head>
    <link rel='stylesheet' type='text/css'  href='style.css'/><!--href='http://code.jquery.com/ui/1.10.3/themes/black-tie/jquery-ui.css'-->
     <script type='text/javascript' src='script_codeNtell.js'></script>
    <!--<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js"></script>-->
    <title></title>
</head>
points
Submitted by sickmore86
over 10 years

2 comments

Francisco Puga over 10 years

You have that line commented, between <! – and – > remove the comment

sickmore86 over 10 years

Oops, I commented that for some test though. It still not working.