JQuery An Introduction - IT magazine

IT magazine

Knowledge that matters

JQuery An Introduction

Share This

Introduction to jQuery


What is jQuery?
          An open source JavaScript library that simplifies the interaction between HTML and JavaScript Created by John Resig in 2005, released in January of 2006.
Built in an attempt to simplify the existing DOM APIs and abstract away cross-browser issues.

Why jQuery?
  • Fully documented.
  • Great community.
  • Tons of plugins.
  • Small size (23kb)
  • Everything works in IE 6+, Firefox 2+, Safari 3+, Chrome, and Opera 9+
Who uses jQuery?
  • Microsoft, Google, Mozilla, IBM, Amazon, HP, Intel.
  • Ruby on Rails, Wordpress, Django, Drupal, CakePHP, ASP.NET MVC.
  • Everyone can agree that jQuery is awesome.

Why Use JQuery Instead of Just Basic JavaScript?

JavaScript is a fairly low-level programming language. It does not provide advanced page manipulation and decoration functions, and it provides nothing concerning animations. Moreover, using direct JavaScript can cause issues related to browser incompatibilities. Those issues have made many JavaScript applications difficult to code, resulting in high maintenance costs.

JQuery aims to ease all these problems by providing a lightweight library that adds many advanced and cross-browser functions to the standard language. In addition, there is a very dynamic community that adds more-advanced components based on JQuery.

A modern Web application wouldn't be complete without some AJAX functionality. JQuery provides functions for sending HTTP GET and POST requests, and it can work easily with the JavaScript Object Notation (JSON) format we saw in the first article. This functionality enables us to query the REST back end we coded in the first article.


Installing JQuery
JQuery is a JavaScript library, so installing it is just a matter of importing a script inside a Web page. However, there are a few best practices to be aware of:

  • JQuery is available through several content delivery networks (CDN). Using those CDNs instead of installing JQuery on your servers should provide significant performance and bandwidth gains.
  • As with any static content, JQuery files should be served compressed. That's why there are two versions of JQuery available: a minified (or “min”) version, which is small and efficient, and a development version, which is easier to read and debug. For the rest of this article, we will use the min version, which is enough for our needs.
  • JQuery files should be cached on the client side, so you should use the JQuery version number in the file name.

No comments:

Post a Comment