jQuery Intro for Beginners

What is jQuery?

jQuery is a cross-browser javascript library designed to simplify the client side scripting of HTML. It was released in January 2006 at BarCamp NYC by John Resig. jQuery is free, open source software.
 
Why jQuery?

jQuery library is providing many easy to use functions and methods to make rich applications. These functions are very easy to learn and even a designer can learn it fast. Due to these features jQuery is very popular and in high demand among the developers. You can use jQuery in all the web based applications irrespective of the technology.
 
Features of jQuery

?    DOM element selections functions
?    DOM traversal and modification
?    Events
?    CSS manipulation
?    Effects and animations
?    Ajax
?    Extensibility
?    Utilities – such as browser version and each function
?    javascript Plugins
 
jQuery Object
 
$("div").addClass("brdrRed");

$ is the jQuery Object ( also named jQuery)

$("div") finds all the div elements in the body and returns a jQuery set (containing 0 to many DOM nodes)

addClass() : is a jQuery function to add css Class to selector(“div”) it will modify all the div elements

It works just like css, it doesn't break when nothing is found.
 
Ready Event
 
$(document).ready(function(){
            //your jQuery codes here
});
 
In order to traverse and manipulate the page we must wait until its ready to be used. Jquery has a ready event that fires the instant the DOM  is ready to be worked with. Stick all your jQuery code in a ready block, load it unobtrusively.

Ebook Download
View all
Learn
View all