To kick off the proceedings here lets quote something about jQuery from jQuery playbooks:
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 you write Javascript
To make it simple for you jQuery is nothing but a document library that you include into your website to give it some additional "functionality". It enhances user interactions and adds a unique feel to your webpages that your users will love. It is extremely simple to use and understand. Just a peek into the code will give you almost complete knowledge of what the code is supposed to do.
To demonstrate how jQuery can enhance user experience let us take the example of a simple FAQ page. Usually a FAQ page consists of a huge number of questions and the user has to manually scroll through them and find a question. A simple example of how a Faq page with 2 questions related to jQuery is given below.
Q. How do I select an item using class or id?
A. 1)$('#myDivId')
This code selects an element with an id of "myDivId". Since id's are unique this expression always selects 1 element, or none if the id does not exist.
2)$('#myDivClass')
This code selects an element with a class of "myCssClass". Since any number of elements can have the same class, this expression will select any number of elements.
Q. How do I test whether an element has a particular class?
A.You can use the is() method along with an appropriate selector
$('#myDiv').is('.myDivClass')
Note that this method allows you to test for other things as well which we will come to in later posts.
The same can be made much shorter and easier for user to browse through by using jquery like this:
Q. How do I select an item using class or id?
A. 1)$('#myDivId')
This code selects an element with an id of "myDivId". Since id's are unique this expression always selects 1 element, or none if the id does not exist.
2)$('#myDivClass')
This code selects an element with a class of "myCssClass". Since any number of elements can have the same class, this expression will select any number of elements.
Q. How do I test whether an element has a particular class?
A.You can use the is() method along with an appropriate selector
$('#myDiv').is('.myDivClass')
Note that this method allows you to test for other things as well which we will come to in later posts.
http://jquery-dude.blogspot.com/2009/10/introduction-to-jquery.html?showComment=1255202191285#c5693853684410717523'> 10 October 2009 at 12:16
I'm the first one to comment on this blog. Yay! Hoping to see more useful posts in the future.
http://jquery-dude.blogspot.com/2009/10/introduction-to-jquery.html?showComment=1255202280412#c4217145834595007494'> 10 October 2009 at 12:18
PS. The comment form seems to have problems. Doesn't show the field for word verification.
http://jquery-dude.blogspot.com/2009/10/introduction-to-jquery.html?showComment=1255202301831#c6087701625128009442'> 10 October 2009 at 12:18
@Nithin: Yeah you are...congrats!!
http://jquery-dude.blogspot.com/2009/10/introduction-to-jquery.html?showComment=1255202367122#c6255217826398998347'> 10 October 2009 at 12:19
@nithin no idea why that does not work!! will have to ponder it 2mrw..