DEV Community

Cover image for What is jQuery
Stackfindover
Stackfindover

Posted on • Updated on

What is jQuery

Hello, friends, in today’s tutorial, we will know what is jQuery, what its use it, the answers to all such questions about jQuery, and much other information are going to be available to you here today. Hope this information will work for you.

The purpose of jQuery is to make it much easier to use JavaScript on your website.

What You Should Already Know to learn jQuery

Before you start studying jQuery, you should have a basic knowledge of:

  1. HTML
  2. CSS
  3. JavaScript

What is jQuery?

jQuery is the most used JavaScript library in the world. It is a very lightweight library. jQuery has been used extensively in web development projects for many years. For every web developer, it is necessary to learn jQuery to enhance their web development skills.

jQuery is neither a Server-Side Language nor a Scripting Language, it is a JavaScript library that is a Client-Side Scripting Language.

Why jQuery?

There are lots of other JavaScript libraries out there, but jQuery is probably the most popular, and also the most extendable.

Many of the biggest companies on the Web use jQuery, such as:

  1. IBM
  2. Netflix
  3. Microsoft
  4. Google

Who invented jQuery

jQuery was developed by John Rising in 2006, jQuery plays an important role in Web Designing, Animation can also be done using jQuery.

Adding jQuery to Your Web Pages

jQuery is a fairly lightweight library of JavaScript, so there is a Pre-Define Library to use. There are 2 ways to use this library:

Local Path:

By local path, it means that you can use it by downloading it on Local Computer and you can download it from the link given below.

Click here to download

From the above link, you can download the latest version of jQuery. By clicking on this link, you will reach the official website of jQuery.

Alt Text

Clicking on the link shown in the screenshot, we will get the jQuery library. Save it with CTRL + S.

So, now we know how to implement jQuery in HTML. For example, our file name is jquery.js, we will include it in the webpage, in the example below we can see.

<!DOCTYPE html>
<html>
<head>
    <title>How to include jquery library</title>
    <script type="text/javascript" src="jquery.js"></script>
</head>
<body>
<h1>How to include jquery library</h1>
</body>
</html>
Enter fullscreen mode Exit fullscreen mode

jQuery CDN:

This is another way to use the jQuery library using a CDN. The library does not exist on a local computer. To use it, we have to provide on our webpage the CDN Path of the library that has its library and the jQuery library can be used by using that CDN Path. In the following example, we can see

If you don’t want to download and host jQuery yourself, you can include it from a CDN (Content Delivery Network).

Google CDN:

<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</head>
Enter fullscreen mode Exit fullscreen mode

Difference between JavaScript and jQuery?

  1. JavaScript is a Scripting Language, while jQuery is a JavaScript Framework.
  2. JQuery is built to make Coding easier in JavaScript.
  3. it was created to avoid complex coding in JavaScript.
  4. it’s a very popular framework. It is used by almost all web developers because it makes many complex tasks of web designing easy.
  5. With the help of jQuery, we can find out whether a browser supports any features or not.
  6. Data can be loaded from the server without refreshing the webpage on the browser using AJAX in jQuery.

jQuery Syntax

jQuery Event Methods

History of jQuery Version

Top comments (2)

Collapse
 
shadowtime2000 profile image
shadowtime2000

No. Just no.

AJAX is already implemented in modern browsers in the form of the fetch function and other web standards.

Also, jQuery isn't recommended for usage in modern times. It is extremely large and can't be optimized with modern techniques such as tree-shaking.

You can figure out if a browser supports a certain feature without jQuery too.

It was a popular framework. It really isn't anymore.

Honestly, this seems like a really low-quality post and I suggest you update it to contain more facts and stuff and just have more content instead of just like a 2 min article about what jQuery is and then links to your own blog

Collapse
 
stackfindover profile image
Stackfindover

Thanks for your suggestion :)
I will try to implement
thanks