Using jQuery Offline.

Using jQuery Offline.

ยท

2 min read

Everyone loves jQuery simply because it helps in making manipulating DOM an easier task, it also enables us to write less and do more. We can use JQuery in our code with two options and these are:

  • Using the CDN (Content Delivery Network) ---Online
  • Downloading the entire library from jQuery. ---Offline
  • Using the "npm" command

Using jQuery CDN and downloading the file can be stressful and inconvenient for some developers especially in the rural areas who are having difficulties with an internet connection. There's a hack to use jQuery in our work with the following simple steps.

  1. Visit the official Jquery Site %[jquery.com]

jquery home.png

  1. Click on the download button and select the "Download the compressed, production jQuery 3.5.1" option.

jquery.png

  1. You will be re-directed to a page that is full of Javascript codes.

jquery download.png

  1. Copy all the codes in there using CMD+A, CMD+C

  2. Go to your directory where you want to put your jQuery folder, in my case I used DESKTOP.

  3. Create a new folder and name it "JQUERY".

  4. Open your folder in IDE or Text-editor of your choice, in my case I'm using VSCODE.
  5. Create a new javascript file (.js) and name it jquery.js
  6. Paste your jQuery code in your jquery.js file by simply pressing CMD+V
  7. Make a reference to the file in HTML file <script src="/JQUERY/jquery.js"></script>

Enjoy using jQuery to write less and do more without an internet connection ๐Ÿ‘Œ