jQueryjQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript.
jQuery is a lightweight JavaScript library that emphasizes interaction between JavaScript and HTML. It was released in January 2006 at BarCamp NYC by John Resig.
jQuery is free, open source software Dual-licensed under the MIT License and the GNU General Public License.
jQury is available in two formats:

  • Compressed (which allows you to have a significantly smaller file size) a.k.a Minified version.
  • Uncompressed (good for debugging and to understand what is behind the magic).

The minified versions, while having a larger file size than the packed versions (note: packed version is not available in current release), are generally the best versions to use on production deployments. The packed versions require non-trivial client-side processing time to uncompress (unpack) the code whereas the minified versions do not. The packed versions of jQuery will take less time to download than the minified or uncompressed versions; however, each time the library is loaded (initially or from the browser cache) it will need to be uncompressed which will cause a non-trivial delay in the execution of any jQuery code each time it is loaded.

Why Choose jQuery?

It’s a hard thing for me to admit, I have spent a lot of time learning, writing and tweaking JavaScript over the years. "Why would I use a library? It’s unnecessary overhead for my site” was a common question when I'm thinking about Javascript library. For a small website, a javascript library almost unnecessary. However, when you do a projects (especially projects using AJAX technology), the process of writing code is a really terrible job. Requirements here is to have a javascript library to support the process of writing code, which you can write then do more.

jQuery was not my immediate choice, there are many feature rich, well-supported JavaScript Libraries available. The major contenders (other than jQuery) that I encountered in my initial research were:

I will compare them in an upcoming article, so I did not say more detail about four javascript libraries above.

My decision to use jQuery in favour of the other available libraries was based on a few requirements I had for whichever I chose:

  • It had to be lightweight, jQuery is only 53Kb (version 1.3.2) when served compressed. Google storaged all Javascripts Libraries on their server and you can use them free of charge by adding the links provided by Google
  • It had to use the DOM almost exclusively (jQuery does this and can traverse XML documents out of the box)
  • It wouldn’t conflict with the namespace of too many of my own scripts (jQuery bases everything around a single object set to the variable $ and even the variable name can be changed if there is conflict. For example, prototype uses the same global variable)
  • I didn’t want using the framework to feel like learning a new language entirely (as you’ll see, the only way jQuery would feel like using another language would be if you did not speak English)

What Are Some Of The Benefits Of jQuery?

Of course, you wouldn’t use a framework or library if there was no benefit or positive result that would come from using it. Let’s briefly go over some of the benefits and features of using the jQuery library.

  • It is (arguably) much easier to understand than scripting with pure Javascript. In this world, the quicker and easier it is to finish the development process the more time we have to focus on other goals.
  • It dramatically reduces the amount of code that needs to be written compared to pure Javascript, which leads to less development time and more readable code. We will go over some example code later on in this article.
  • It makes using Ajax extremely easy, it only takes about 5 lines (sometimes less!) of code to make a simple Ajax call.
  • The documentation is extremely well organized and the community is very active with helping out anyone who may be struggling with a snippet of code.
  • A wide range of plugins and extensions have been developed for jQuery to make it easy for you to get the exact functionality you are looking for.
  • jQuery is fun!

The jQuery UI CSS Framework

jQuery UIjQuery UI includes a robust CSS Framework designed for building custom jQuery widgets. The framework includes classes that cover a wide array of common user interface needs, and can be manipulated using jQuery UI ThemeRoller. By building your UI components using the jQuery UI CSS Framework, you will be adopting shared markup conventions and allowing for ease of code integration across the plugin community at large.
jQuery UI provides a comprehensive set of core interaction plugins, UI widgets and visual effects that use a jQuery-style, event-driven architecture and a focus on web standards, accessiblity, flexible styling, and user-friendly design. All plugins are tested for compatibility in IE 6.0+, FF 2+, Safari 3.1+, Opera 9.0+, and Google Chrome.
jQuery is flexible enough for a wide range of interests. It also simplifies matters quite a bit, making it possible for users to concentrate on more pressing tasks.

jQuery: http://www.jquery.com
License: MIT and GPL License
Requirements: Internet Explorer 6.0+, Firefox 1.5+, Safari 2.0+, Opera 9.0+

One reason I believe this is a strong framework choice is the myriad of extensions (framework, widgets, and UI controls) that are available through the jQuery community. Their well-designed API/documentation and live examples reflect the maturity of this framework. A variety of google groups are also in place of standard forums.