Rendevious
Impossible is Nothing

Why not jQuery?

February 2nd 2009 in programming

Why not jQuery?

I love jQuery. okay rub it. I adore, flaunt jQuery. Why?

What is jQuery?

From the jQuery website

jQuery is a new kind of JavaScript Library. jQuery 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.

Yes. jQuery is designed to change the way you write javascript.

So how it change the way we do javascript?

Consider the following javascript statement

document.getElementById("example");

This above returns #example as an object

So here’s the jQuery equivalent

$("#example");

get an element which has the class name example

$(".example");

select using tag names

$("input");

parent to child selector

$("p > span");

and there’s whole range of other possibilities here

Here’s AJAX handler with jQuery

response = $.ajax(
{
type: "get",
url: "report.php",
data: "var=value",
dataType: "json",
error: function(e)
{
//error handler
},
success: function(data)
{
//'data' has the server returned data
}
});

above is compatible across all browsers… Cool…!

And there’s much more than just selectors

So what are the other excitements?

There are lot more plugins, widgets like date picker, progress bar, slider, dialog windows…

You can add simple effects that supported in the core library and there is utility functions like trim (finally trim function like other languages)

Still not convinced?

  • jQuery Methods and functions works in all modern browsers(count IE6 too)
  • Google, Digg, Mozilla, Wordpress, Drupal, Microsoft, Nokia and much more are using this 18kb(minified and compressed version 1.3.1) library
  • Can easily be integrated with tools and frameworks

And did I mention all this comes for FREE!!!!!!

Go get it; javascript is never been fun and easy like this.

  • Share/Bookmark

2 comments to...
“Why not jQuery?”
Avatar
Harikumar.M

Nice website!

Has lots of information as take aways. Keep up the good work.


Avatar
Yashwanth Shetty

Great blog, keep up the good work.




required



required - won't be displayed


Your Comment:

We have all wished many times……………..times when things have gone wrong…times when things have come close to what we actually we wished….well may be not satisfied with what we get..Huh!!
Have you wished to get some sleep in b/w busy work schedule…. But couldn’t afford to live the desk even for a minute? Wished to [...]

Previous Entry

When you are near to her, heart beat raises from 72/pm to e^345/pm(pure adrenaline rush)
You want to talk a lot with her. But don’t know where to start and what to talk..
When someone asks something you foolishly make a smile(you won’t know that until they makes fun on this) and you are no where there [...]

Next Entry