Learn jQuery for Free - Nemtech

NT
0
jQuery Introduction
The purpose of jQuery is to make it easier to use JavaScript on your website.

What You Should Know 

Before you can start studying jQuery, You should have a basic knowledge of: 
If you want to read these articles first, find the tutorial on our Home page

What is jQuery?

jQuery is simple, "write less, do more", the JavaScript library. 
The purpose of jQuery is to make it easier to use JavaScript on your website. 
jQuery takes many common tasks that require multiple lines of JavaScript code to accomplish, and then wraps them up in ways that you can drive with one line of code. 
jQuery also simplifies many complex things from JavaScript, such as AJAX calls and DOM deception.
The jQuery library contains the following items: 
  • HTML / DOM management
  • CSS manipulation
  • HTML event modes 
  • Effects and animations
  • AJAX 
  • Utilities

Tip: In addition, jQuery has plugins for almost any function out there. 

Why jQuery? 

There are many other JavaScript libraries out there, but jQuery is probably the most popular, and most accessible. 

Many large companies on the Web use jQuery, such as: 
  • Google
  • Microsoft
  • IBM
  • Netflix 

Will jQuery work on all browsers? 

The jQuery team knows all about browser problems, and has written this information in the jQuery library. jQuery will work the same on all major browsers.

jQuery Get Started
Adding jQuery to your web pages
There are several ways to start using jQuery on your website. You can:

  • Download the jQuery library from jQuery.com
  • Install jQuery from a CDN, similar to Google

Download jQuery

There are two versions of jQuery available for download:

  • Product type - this is for your live website because it is compiled and compressed
  • Type of development - this is for testing and development (code that can be pressed and readable)

Both versions can be downloaded from jQuery.com.
The jQuery library is a single JavaScript file, and you can point it to the HTML tag <script> (note that the <script> tag must be within the <head> section):
<head>
<script src="jquery-3.5.1.min.js"></script>
</head>
Tip: Insert the downloaded file into the same directory and pages where you wish to use it.

jQuery CDN


If you do not want to download and handle jQuery yourself, you can install it on a CDN (Content Delivery Network).

Google is an example of someone who owns jQuery:
Google CDN: with Exp.
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $("button").click(function(){
    $("p").hide();
  });
});
</script>
</head>
<body>

<h2>This is a heading</h2>

<p>This is a paragraph.</p>
<p>This is another paragraph.</p>

<button>Click me</button>

</body>
</html>

Copy this code and view the results this type : 👇

This is a heading

This is a paragraph.

This is another paragraph.

One of the biggest benefits of using jQuery hosted from Google:

Many users have already downloaded jQuery from Google when they visit another site. As a result, it will be loaded from the repository when they visit your site, resulting in faster loading time. Also, most CDNs will ensure that when a user requests a file from them, they will be delivered from the server closest to them, resulting in faster loading time.

Post a Comment

0Comments
Post a Comment (0)