What is jQuery?
Directly taken from the website of jQuery -” jQuery is a fast, concise, JavaScript Library that simplifies how you traverse HTML documents, handle events, perform animations, and add Ajax interactions to your web pages”.It is basically a JavaScript framework for writing huge task of JavaScript with few lines of code.
What are the benefits of jQuery?
1) 5 lines of code of jQuery can perform better task than 25 lines of traditional Javascript code.
2) Various number of plugins are available and a large community support this project it is better to use jQuery in your project compared to other JavaScript frameworks like prototype.js or moottools .
3) jQuery’s website contains very good documentation with useful examples.
4) It simplifies the Ajax Development. Just have to write 5 or 6 lines to call the Ajax. Isn’t that easy??
Well these are just few benefits of jQuery but if you start using jQuery then you’ll come to know about the actual benefits of using jQuery. And believe me, It worth using jQuery in your web applications otherwise just blame me.
Basic Examples of jQuery :
$(document).ready(function() { $(".button").click(function () { $("p").hide("slow"); }); });
In the above example, when a element with class “button” is clicked, all the paragraph element (”p”) will be hidden in the whole document in slow movement i.e. with slight animation.
$(document).ready(function() { $("#divid").load("sample.php"); });
Above is the example Ajax using jQuery, look how simple it is to use ajax using jquery.The response got from the sample.php file is filled inside the element whose id is “divid”.
Free Ebook for download :
Well I’ve downloaded a E-book of jQuery in chm format.It contains chm version of the document found in docs.jquery.com. This E-book contains the very good documentation as well as useful examples.
Leave a Reply