jQuery Introduction


In this tutorial, You will learn about JQuery, the need for it, as well as its benefits.

JQuery Introduction

  1. jQuery library was originally created by John Resig in early 2006 with the nice motto - Write less, do more.
  2. jQuery is not a language, but it is a well-written JavaScript code.
  3. jQuery is a fast lightweight, "write less, do more" JavaScript library. The main purpose of jQuery is to make it much easier to use JavaScript on your website. There are lot of the complicated things in JavaScript like AJAX calls and DOM manipulation. Jquery makes these thing simple.
  4. It's easy-to-use APIs makes the things like HTML document traversal and manipulation, event handling, adding animation effects to a web page much simpler that works seamlessly across all the major browsers like Chrome, Firefox, Safari, Internet Explorer, etc.
  5. jQuery also gives you the ability to create an Ajax based application in a quick and simple way.
  6. Many of the biggest companies like Google, Microsoft and IBM are using the jQuery to develop their applications.
  7. Before you start studying jQuery, you should have a basic knowledge of HTML, CSS, JavaScript.
Pictorial representation of jQuery in the ocean of JavaScript. jquery Introduction

jQuery also simplifies a lot of the complicated things from JavaScript, like AJAX calls and DOM manipulation. The jQuery library contains the following features:

  • HTML/DOM manipulation
  • CSS manipulation
  • HTML event methods
  • Effects and animations
  • AJAX
  • Utilities

Why do we need jQuery?

The following points which defines need of jQuery.

  1. It wraps the many lines of JavaScript code into a single line of code and provides the same functionality.s
  2. It simplifies a lot of the complicated things from JavaScript, like DOM manipulation and AJAX calls.
  3. It makes event handling, animation much simpler. It has an easy-to-use API that runs across a large number of browsers.
  4. JavaScript becomes so easy and simple when we use jQuery. Basically, It makes development faster and reduces time and effort.

Why Should not use jQuery?

The following points which defines no need of jQuery.

  1. It doesn’t do anything you can’t do on your own.
  2. It’s an unnecessary dependency.
  3. Reduces performance.
  4. It’s old and everyone has moved to React/Angular/Vue.

Advantages of using jQuery

If jQuery is unfamiliar to you, you might be asking what makes it unique. There are a number of benefits to choosing jQuery.

  1. Absolutely Free - And the best part is, it is completely free to download and use.
  2. Available Plugins - It has already available plugins, which make developers’ life easy.
  3. Cross-Browser Support - It has cross-browser support.
  4. Built-in Animation - It have predefined method "animate()" for create custom animation on web-page.
  5. Save lots of time - You can save lots of time and efforts by using the jQuery inbuilt effects and selectors and concentrate on other development work.
  6. Simplify common JavaScript tasks - jQuery considerably simplifies the common JavaScript tasks. Now you can easily create feature rich and interactive web pages with fewer lines of codes, an example would be using Ajax to update a page's content without reloading it.
  7. Easy to use - jQuery is very easy to use. Anybody with the basic working knowledge of HTML, CSS and JavaScript can start development with jQuery. Compatible with browsers - jQuery is created with modern browsers in mind and it is compatible with all major modern browsers such as Chrome, Firefox, Safari, Internet Explorer, etc.
  8. It is a very lightweight library with a size of about only 19KB.

Disadvantages of using jQuery

There are a number of disadvantages to choosing jQuery.

  1. Unsuitable for complex projects - You can manipulate DOM elements easily with jQuery. The features of jQuery are limited when you’re working on complex projects. Therefore, they are not suitable for large or complex projects where additional resources are needed.
  2. Debugging issues - Libraries and plugins grow in number along with their sizes and dependencies in projects. Debugging will be difficult.
  3. Requires understanding of CSS - You must understand the basics of CSS. Classes and IDs are also essential CSS selectors to know.

Next