Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

How to setup jQuery on my web server?

I have a website and I want to setup jQuery on my web server itself. jQuery can be set using the Google or Microsoft CDN easily. But, I want to setup jQuery on my web server. How can I set environment easily? Which tag is used for this purpose?


1 Answer
David Meador

To run jQuery on your web pages, add the library file within a pair of <script> tags. The location of the jQuery library file is added under the <script> tags, which point to the location of the jQuery library file on the Web server. Here’s an example,

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

The location of the jQuery file on the web server should be the same as what you added in the script tags. Even if you don’t want to go for the hassles in setting up jQuery, then go for CDN. With Google CDN, it will be an easier way to include jQuery without any need of about uploading it on the web server.

Here’s how to add jQuery using Google CDN:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>

Advertisements

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.