1

When trying to open Jquery after installing it on Chrome, I get this error:

enter image description here

And when I download it on Firefox, I get this error:

enter image description here

Can anyone tell me how to fix these issues? I'm using Windows 10, if that helps.

3

JQuery isn't something you "open" it is a JavaScript library you include and reference in your website's code via <script></script> tags.

An example taken from the jQuery site itself is:

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>Demo</title>
</head>
<body>
    <script src="jquery.js"></script>
    <script>
        $(document).ready(function() {
            alert('The DOM is loaded.'); 
        });
    </script>
</body>
</html>

I suggest reading up more about jQuery in there own docs or just searching the web. Also jQuery is hosted on many CDN's so you don't even need to download it technically to use it, you can include it in your code via

<script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>

Keep in mind the pro's and con's of loading such libraries from a third party/CDN.

PROS

  • CDN will delivery the resource to the user usually faster then your own host can since they have distributed networks around the world to deliver the content to users from the fastest point to them.
  • Since your not hosting the script the server load isn't on your end freeing up more resources and load time from your own server.

CONS

  • Your at the mercy of a third party to keep the link active and working at all times and not tampered with.

Obviously more pros and cons are out there but you can lookup that up if you want more information; going deeper here is beyond the scope of this question.

  • This completely answered my question. Thanks! Jquery was my first experience with downloading a library and I tried to see what it was all about without reading the instructions, so I had no idea what to expect. – Andre Acres Sep 4 '17 at 15:55
  • No problem, libraries are fun to play with specially jQuery; it was my first real JavaScript library I used/learned from way back when... and once you get more technically advanced in a language they are a good way to learn from as you can view the non-minified version of scripts most of the time. So you can examine them to see how they went about doing certain tasks and code certain ways. – Jeff Wilbert Sep 6 '17 at 17:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.