What is jQuery?

Today I got a question from one of my colleague who is a fresher and doesn't know what is jQuery. So he came to me and asked me what is jQuery and why should we use jQuery? So I have explain it to him and thought of writing a post as well about what is jQuery and why one should use it?

What is jQuery?

jQuery is a library written on top of the JavaScript. So it is a JavaScript library. jQuery is amazing library for the JavaScript programmers, which makes web development a piece of cake. jQuery helps the programmers to keep code simple and concise. The biggest advantage of jQuery is that jQuery library is designed to keep the things very simple and reusable. Motto is jQuery library is "Writing Javascript code should be fun."

jQuery library simplifies the interaction process or access process of traversing in HTML document. It provides methods to make animations, add ajax interaction to the page, provides an easy way to apply CSS to any items and provides an easy mechanism for binding and unbinding events. Length JavaScript code can easily replaced by few lines of code in jQuery.

Why to use jQuery

A question came that when all the things can be achieved using JavaScript then why to go for jQuery? Well the answer is that The jQuery library is has many easy to use functions and methods to make rich applications. And believe me these functions are fairly easy to learn and even it is not difficult for designers or freshers to learn. Due to it's simplicity, jQuery is pretty easy to learn and easy to write. jQuery is a client side language so it can be easily used with ASP.NET,PHP,JSP and Servlets.

Features of jQuery

  • Allows to access elements in the document: If one need to access the DOM tree without any JavaScript libarary, one has to write many lines of code. jQuery provides a selector mechanism to access any part of DOM.
  • Easily apply CSS: As it’s known that CSS is the most powerful and mostly used for good appreance of any webpage. jQuery provides CSS Selectors which allows to change the CSS classes or individual style for any portion of the document. This can be done even after the page is rendered.
  • Make Animation: For better user experience, animation can do the job for you. jQuery provides many methods to perform animations like show,hide, fade, wipe, start, stop etc. Doing all this with jQuery is fun as No huge lines of code, no complex logic.
  • Ajax Interaction: In today’s world, Ajax is one of the most popular technology used in almost every website for better user experience. jQuery provides support for ajax also which allows to access server side event without refreshing the web page.
  • API to change document’s content: jQuery provides API (Application Program Interface) which allows to change the content of the document. Changing Text, inserting images, ordering of list can be done with few keystrokes with jQuery API. Entire structure of HTML can be rewritten or extended.
  • Event handling: Any technology is a failure if it cannot responsed to the user when any event takes place. Event handling is one the decent feature of jQuery. It quickly responsed to any event such as user clicking a button.

Where to download jQuery from

jQuery file can be downloaded from jQuery Official website http://www.jquery.com/

jQuery Versions

jQuery library comes in 2 forms:

  • The uncompressed .js file is easy to read and modify, but it's around 190kb in size (at the time of writing).
  • The minified .js file has all comments, whitespace, and other unnecessary characters removed from the file, squeezing the whole library into a mere 23kb. Although you can't easily read the code, this is the version you'll want to place on your site, as it's much quicker for visitors to download.

When this post is written, the latest version of jQuery is released is 1.7.1

So what are you waiting for..start learning jQuery and have fun... Some of my previous series of articles will help you to learn jQuery.

Feel free to contact me for any help related to jQuery, I will gladly help you.

Responsive Menu
Add more content here...