Click here to Skip to main content
13,193,405 members (57,823 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

10.9K views
2 bookmarked
Posted 27 Jul 2013

Why jQuery

, 27 Jul 2013
Rate this:
Please Sign up or sign in to vote.
Why jQuery

Introduction

As a web developer, JavaScript is the most obvious thing we use for client side scripting. Many developers prefer jQuery instead of pure JavaScript for client side scripting, but the question arises as to how JavaScript is different from jQuery and why should we use it. In this article, we will try to understand the same.

Contents

JavaScript vs. jQuery?

In order to answer this question, we have to understand:

  • What is meant by Application and what is meant by Library?
  • How to create Libraries
  • How jQuery is different from JavaScript

What is Meant by Application and What is Meant by Library?

Live examples for applications are facebook.com, Microsoft Office, Visual Studio, an inventory management system, etc. Application caters to end user requirements. For creating such application, we use some already created libraries and achieve quick development, surety of proper working (because libraries will be pre-tested and proven).

How Can We Create Library?

We start with some tools like Visual Studio where we will write some code using some programming languages like C# or VB.NET and then we call it as library.

  • If we can call that code block as self-contained code block
  • If we can use the code written there in more than one application without repeating a single line of redundant code
  • If it is not self-executable

jQueryvs.JavaScript

JavaScript is a language we use for client side scripting and jQuery is nothing but a library containing a set of functions (reusable functions) created using JavaScript.

Why to Use jQuery?

It’s a very good question why we should use jQuery and not something else?

  • It's lightweight - jQuery is a lightweight library and because of its lightweight characteristics. it provides high performance, it’s a very well written code which is about 32 kb size.
  • Cross browser support jQuery supports cross browser, means while working with JavaScript, the most important factor we have to consider is browser whereas while working with jQuery, we are not at all required to worry about browser because JQuery functions are completely browser independent.
  • Easy Dom traversing - With the help of jQuery, we can find parent or child of any HTML element at any time without writing much code.
  • Easy Plugins -jQuery is highly extensible. It lets you extend the existing behavior and even you can easily add new behaviors. You can easily find huge plugins over internet.
  • Tested, commonly used and documented Because of huge popularity, not only can you get answers for most of the jQuery questions easily in forums but also availability of huge documentation makes learning jQuery very easy.

Hope you enjoyed reading this article. For more, please visit www.sukesh-Marla.com.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Marla Sukesh
Instructor / Trainer Train IT
India India
Learning is fun but teaching is awesome.

Code re-usability is my passion ,Teaching and learning is my hobby, Becoming an successful entrepreneur is my goal.

By profession I am a Corporate Trainer.
I do trainings on WCF, MVC, Business Intelligence, Design Patterns, HTML 5, jQuery, JSON and many more Microsoft and non-Micrsoft technologiees.

Find my profile here



My sites



@Twitter
@Facebook

You may also be interested in...

Comments and Discussions

 
-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.171017.2 | Last Updated 27 Jul 2013
Article Copyright 2013 by Marla Sukesh
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid